Skip to content
New issue

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

New column-length default? #29

Closed
henryiii opened this issue May 22, 2024 · 1 comment · Fixed by tox-dev/pyproject-fmt#224
Closed

New column-length default? #29

henryiii opened this issue May 22, 2024 · 1 comment · Fixed by tox-dev/pyproject-fmt#224

Comments

@henryiii
Copy link
Contributor

I'd like to propose possibly changing the default of column-length (to 80 or 88 or 120, I don't care which). When it's set, Taplo acts like black; a trailing comma forces one-per-line, but leaving off the trailing comma allows lists under the column-length to fit on one line. It's a backward compatible change: existing files formatted with pyproject-fmt will not change, since they have the trailing comma added already.

Left alone:

a = [
  "b",
]

Now supported too with the default change:

a = [ "b" ]

A lot of pyproject.toml doesn't change rapidly, so this still reduces the LoC and visual clutter quite a bit. Things that do (like classifiers) will still be always multiline, and users can pick based on the trailing comma.

Thoughts?

(If not, I can just always set this config option, I just thought being more black-like out of the box would be nice)

@gaborbernat
Copy link
Member

I'm fine with this let's do 120.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants