Skip to content

Conversation

@sfoster1
Copy link
Member

@sfoster1 sfoster1 commented Dec 24, 2025

Using ruff's https://docs.astral.sh/ruff/settings/#lintisort isort integration we can sort our python imports! Finally!

The first commit has the settings for this, the rest of the commits just add them.

Draft for circular import reasons.

Ruff ( https://docs.astral.sh/ruff ) is a modern code checking tool that
combines many formatting and style/correctness linting tools and is
really fast. It has a lot of options for things that have previously
been flake8 plugins or separate tools, and it's configured in
pyproject.toml instead of a separate file.

It also has a lot of options for things we've wanted forever but haven't
found a good tool for yet - like import sorting!

Its formatting codestyle philosophy is very similar to black - not a lot
of options, which is good - and so is its formatting output... but its
formatting output is not _identical_ to black's, and so there is a big
old diff here that is 99% automatic and 1% "that type: ignore or noqa is
in the wrong place now".
Giant diff, no code changes.
Add ruff isort integration!
@sfoster1 sfoster1 requested review from a team as code owners December 24, 2025 16:42
@sfoster1 sfoster1 requested review from ncdiehl11 and removed request for a team December 24, 2025 16:42
@sfoster1 sfoster1 marked this pull request as draft December 24, 2025 16:44
Copy link
Collaborator

@ddcc4 ddcc4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is a big diff. I'm glad we don't have an active release branch that will create merge conflicts with this :)

Base automatically changed from switch-to-ruff to edge December 24, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants