tox-dev / pyproject-fmt

MIT License
167 stars 27 forks source link

Add an option that controls whether lists are sorted #234

Closed nathanjmcdougall closed 2 months ago

nathanjmcdougall commented 2 months ago

It would be great to have a setting which configures whether lists are sorted or not.

My rationale is that sometimes it is helpful to be able to organize list elements into groups with comments etc. For example, linter rule codes.

gaborbernat commented 2 months ago

We are aiming to be similar to the Black formatter. The less configuration the better. The only kind of contribution I would accept is a fmt on/off comment block.

nathanjmcdougall commented 2 months ago

Okay, that's a fair decision. Would you accept an update to the docs which says so explicitly? E.g. a Philosophy paragraph.

gaborbernat commented 2 months ago

Definitely 😃