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

Use ruff for linting/formatting #297

Merged
merged 4 commits into from
Jan 7, 2025
Merged

Use ruff for linting/formatting #297

merged 4 commits into from
Jan 7, 2025

Conversation

alexreinking
Copy link
Member

I want to make some bigger changes to the buildbot master, namely to use CMake presets inside the repository to drive configuration. But I want a good formatter/linter combo.

We were using flake8 for linting, but when I went to use Black for formatting, it didn't like some of the spacing around :s or something? At any rate, it's slow and ruff seems great.

Run ruff check to lint and ruff format to format.

@alexreinking
Copy link
Member Author

If you're okay with it, I can configure ruff to normalize the string quotation type automatically. Right now, it's set to preserve existing quotes. The diff would have been hard to review with quote normalization enabled.

Copy link
Contributor

@steven-johnson steven-johnson left a comment

Choose a reason for hiding this comment

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

I like ruff's formatting a lot.

@alexreinking alexreinking merged commit 44f9b0e into master Jan 7, 2025
1 check passed
@alexreinking alexreinking deleted the format-black branch January 7, 2025 21:03
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.

2 participants