Closed ff137 closed 1 month ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
85.8% Coverage on New Code
1.2% Duplication on New Code
Been itching to contribute this for a while. I reflexively sort imports, and always have to withhold here cuz it changes too much 😄
Now's probably as good a time as any to organize imports for the codebase!
At present, the Ruff formatter doesn't sort imports (they say it is planned): https://docs.astral.sh/ruff/formatter/#sorting-imports
But, they allow to sort imports and format with:
This is mostly identical to
isort
, butisort
includes some additional improvements in structure.So, I applied
isort . --profile black
, followed byruff check --select I --fix
andruff format
.Tada. :tada: One bulk change to neaten up imports across the board.
Thought this is maybe worth squeezing in before the official release. Can come later if it's just a spanner in the works.
I don't see any need to include a rule like this to the lint workflow. That can probably be added eventually when ruff supports organizing imports in one command.