We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a new rye project and you will see that the empty arrays in pyproject.toml are formatted on one line.
pyproject.toml
$ rye init hello $ cd hello/ $ cat pyproject.toml [project] name = "hello" version = "0.1.0" authors = ... dependencies = [] readme = "README.md" requires-python = ">= 3.8"
For example, dependencies = []. If you add a dependency, it will reformat the array like so
dependencies = []
$ rye add requests
dependencies = [ "requests>=2.31.0", ]
But then if you remove that dependency
$ rye remove requests
dependencies = [ ]
an extra \n remains.
\n
I expected an empty array to not contain a \n.
$ rye --version rye 0.33.0 commit: 0.33.0 (58523f69f 2024-04-24) platform: macos (x86_64) self-python: cpython@3.12.3 symlink support: true uv enabled: true
No response
The text was updated successfully, but these errors were encountered:
Fix TOML array formatting (#1084)
3dfdcdb
Closes #1083 A trailing newline is only added if there are dependencies or comments in the array.
Successfully merging a pull request may close this issue.
Steps to Reproduce
Create a new rye project and you will see that the empty arrays in
pyproject.toml
are formatted on one line.For example,
dependencies = []
.If you add a dependency, it will reformat the array like so
But then if you remove that dependency
an extra
\n
remains.Expected Result
I expected an empty array to not contain a
\n
.Actual Result
Version Info
Stacktrace
No response
The text was updated successfully, but these errors were encountered: