Describe the bug
The sorting of imports is not consistent with ruff CLI output.
The plugin is awesome but when it is enabled, it highlights the imports that are sorted properly by categories. If I reformat the code using the plugin, it rearranges the imports in some weird order (3rd party packages being mixed with the local code packages), which is totally different from what ruff check --select I --fix
does. So if sort imports properly with the external command ruff check --select I --fix
, then the plugin complains on my imports and tries to rearrange them back.
So in order to use the plugin I have to either cope with seeing yellow highlights on all (properly sorted) imports, or give up proper sorting and let plugin do the weird sorting.
To Reproduce
Steps to reproduce the behavior:
ruff check --select I --fix
Expected behavior
The plugin should yield the same results of imports sorting as the official ruff command ruff check --select I --fix
.
Screenshots
You can see how imports sorted properly by the ruff check --select I --fix
command are highlighted by the plugin with yellow, while it shouldn't.
And this is the order plugin thinks is correct but it's not.
Environments (please complete the following information):
Notes:
UPDATE
Noteworthy is that if I remove the reference to the pyproject.toml file in the plugin settings, it does sorting correctly. But in that case it ignores all other settings like line length etc.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too