Replies: 2 comments
-
In general, we're hesitant to add configuration options. I feel like the vast majority of projects use the default order. It'd be nice for us to stick to enforcing a consistent ordering in the ecosystem if possible. Could you share why this order is better for you? (other than it's what you're doing already) I'm happy to hear from other community members too! |
Beta Was this translation helpful? Give feedback.
-
I suppose it's just for historical reasons, from before the time we had intelligent helpers to sort our imports-- |
Beta Was this translation helpful? Give feedback.
-
Several of my projects have
isort
configured withfrom_first=true
(https://pycqa.github.io/isort/docs/configuration/options.html#from-first). This results in something like this:being formatted as
Most of the codebase follows this pattern because of our style guide and pre-commit hooks.
I haven't figured out how to configure
ruff
to maintain this style. The best result I have right now is:Beta Was this translation helpful? Give feedback.
All reactions