You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if I just missed this in the documentation. I would like to propose combining the formatting and import formatting capabilities into a single CLI command. The motivation for this request is so that I may use the ruff formatter with the helix editor.
From what I understand I currently must run ruff --select I --fix <file> then ruff format --line-length 120 --quiet to format both the file and the imports. If these were combined into a single command, I could easily hook this into the helix editor. In an ideal world there would also be a way to specify quote-style = "single" via the command to match personal preference. Thanks!
We plan to enable a unified workflow to run the linter and formatter in a single command, but we're still working out the design. @MichaReiser, do you know if there's an existing issue we could merge this into?
We've explicitly chosen not to include import sorting in formatting because it can change the semantics of your code at runtime which the formatter should never do.
Regardless, per #8232 we intend to introduce a unified command that should suffice for this use-case. We'll track this there for book-keeping.
Activity
charliermarsh commentedon Oct 20, 2023
We plan to enable a unified workflow to run the linter and formatter in a single command, but we're still working out the design. @MichaReiser, do you know if there's an existing issue we could merge this into?
skewty commentedon Oct 26, 2023
I was about to report this as a bug. To me the "isort" action should be done when I use the format command.
zanieb commentedon Oct 26, 2023
We've explicitly chosen not to include import sorting in formatting because it can change the semantics of your code at runtime which the formatter should never do.
Regardless, per #8232 we intend to introduce a unified command that should suffice for this use-case. We'll track this there for book-keeping.