Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooling: drop flake8, configure ruff #694

Merged
merged 1 commit into from
Aug 25, 2024
Merged

Tooling: drop flake8, configure ruff #694

merged 1 commit into from
Aug 25, 2024

Conversation

dbarnett
Copy link
Collaborator

@dbarnett dbarnett commented Aug 23, 2024

Why: Ruff is more powerful, flexible, and faster than flake8, with better defaults and integrated formatter.

FYI I also added corresponding editorconfig settings to help ensure that editors and formatters aren't fighting each other over the style defaults, but it's technically independent (and actually ignored by ruff currently ☹️).

@dbarnett dbarnett requested a review from mdengler August 23, 2024 23:07
@dbarnett
Copy link
Collaborator Author

BTW my motivation is more to get off of flake8 than to rush to get onto ruff, but I like what I've seen of ruff so far and tox config makes it fairly painless to switch dependencies.

The set of checks I enabled seemed like a pretty uncontroversial set of basic checks, but we can totally customize later if any of them are giving people grief.

Also note I didn't batch reformat files through ruff and I'm not planning to try to enforce strict formatting policies or anything, but I did peek through the diff of formatting changes ruff would want to perform if we asked it to reformat everything and adjusted some settings to try to keep that suggested formatting pretty close to the existing versions where possible.

@dbarnett dbarnett force-pushed the tooling branch 6 times, most recently from 88bf840 to b9fe853 Compare August 24, 2024 22:41
@dbarnett dbarnett changed the title Tooling: drop flake8, configure ruff and editorconfig Tooling: drop flake8, configure ruff Aug 24, 2024
@dbarnett
Copy link
Collaborator Author

@mdengler FYI I went ahead and submitted the .editorconfig changes separately while I was waiting for review here. Mostly just looking for a gut check that switching to ruff looks reasonable.

@dbarnett
Copy link
Collaborator Author

Gonna go ahead and merge this one too. Can easily revert it later if needed.

@dbarnett dbarnett merged commit 4bb0859 into master Aug 25, 2024
16 checks passed
@dbarnett dbarnett deleted the tooling branch August 25, 2024 18:17
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.

1 participant