Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

New column-length default? #29

@henryiii

Description

@henryiii

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions