Closed my1e5 closed 4 months ago
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
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 soBut 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