astral-sh / ruff

An extremely fast Python linter and code formatter, written in Rust.
https://docs.astral.sh/ruff
MIT License
31.06k stars 1.03k forks source link

[meta][feature] more of `isort` #6190

Open yozachar opened 1 year ago

yozachar commented 1 year ago

I'd like to aggregate feature request related specifically to isort here:

Feel free to add yours below if I missed any.

mjpieters commented 1 year ago

Is there a usecase for implementing isort's presets? E.g. preset = black is short-hand for:

multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 88
split_on_trailing_comma = true

Note that most of these settings are not available in Ruff (yet); the only exception being the last two options.

charliermarsh commented 1 year ago

Thanks! FWIW my general attitude is that I'm open to contributions for additional isort options, but we likely won't prioritize implementing them ourselves, and we likely won't support the options that enforce dramatically different formatting (e.g., any of the grid modes or alternate wrapping behaviors like multi_line_output -- it's just too much maintenance burden to support so many different formatting modes given how much less common they are IMO). That's in juxtaposition to options like lines-before-import which are comparatively less dramatic.

Cadair commented 7 months ago

One major bump in my projects adopting the ruff isort'er is the length sort sections option. Is this something that a contribution would be welcome for?

Skypekey commented 2 months ago

Is there a plan for resolve the first issue? Support heading setting for isort