Skip to content

Conversation

@ghickman
Copy link
Contributor

This swaps out flake8 and isort for ruff. I've enabled a few rulesets that I tend to use everywhere. We might want to add more? There are a couple of commits after the swap, fixing errors brought up by it, all in the pyupgrade family.

One oddity I noticed was that the dev tooling, such as black/flake8/etc., is not installed outside of pre-commit, so to test these changes, I had to install ruff manually.

Copy link
Contributor

@meshy meshy left a comment

Choose a reason for hiding this comment

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

Nice one!

rev: 5.13.2
hooks:
- id: isort
- id: ruff
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'd benefit from having ruff-format here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of black?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I forgot that we'd need to remove that too.

Yes, I think we should use ruff instead of black, but that can wait for another PR.

Copy link

Choose a reason for hiding this comment

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

Addressed in #297

@meshy meshy merged commit be2107c into main Jun 2, 2024
@meshy meshy deleted the switch-to-ruff branch June 2, 2024 10:15
ulgens added a commit to ulgens/ccbv that referenced this pull request Dec 13, 2025
ulgens added a commit to ulgens/ccbv that referenced this pull request Dec 13, 2025
Already enabled as a ruff rule set

Relates to classy-python#236
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.

4 participants