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
{{ message }}
Repository navigation
Handling of isort-related errors and other autofix codes #29
With #25 being merged soon, the question remains whether formatting should be enabled by default and error codes should be given to be auto-fixed when running formatting.
I don't really mind on or the other, so I'm open to suggestions.
If e.g. isort-codes should be used for formatting per default, we should also disable pylsp-isort.
That depends on whether ruff supports this kind of action. I couldn't find any immediate support for that, but as far as I know rope (and thus pylsp-rope) supports this.
You could create a feature request issue on ruff's github but i think the idea of ruff is to stay on providing linting features rather than code reformat actions. Nevertheless it might be worth the try.
Activity
[-]Handling of isort-related errors[/-][+]Handling of isort-related errors and other autofix codes[/+]Shane-XB-Qian commentedon Apr 17, 2023
i am curious to ask if this can offer 'additionalTextEdits' which offer auto-fix for auto-import when writing a method but did not import it yet.
jhossbach commentedon Apr 20, 2023
That depends on whether
ruffsupports this kind of action. I couldn't find any immediate support for that, but as far as I knowrope(and thuspylsp-rope) supports this.Shane-XB-Qian commentedon Apr 21, 2023
jhossbach commentedon Apr 21, 2023
You could create a feature request issue on ruff's github but i think the idea of ruff is to stay on providing linting features rather than code reformat actions. Nevertheless it might be worth the try.