Skip to content

Conversation

@vincentmacri
Copy link
Member

@vincentmacri vincentmacri commented Dec 4, 2025

Also fix a few rules that were only violated a small number of times.

This PR:

  • Removes list of rules we want to follow from src/tox.ini to remove duplication
  • Defines all rules we wish to follow in pyproject.toml
    • For rulesets that are not stable enough yet (E, PL) we list the rules explicitly instead of enabling all E or all PL rules.
    • We still ignore specific E and PL rules that we don't want to follow because the hope is that once the E and PL rules are fully stable in ruff we will just enable them all and selectively disable the ones we don't want.
  • We add a new file .github/workflows/ruff.toml that starts with the pyproject.toml configuration (using extend, so no duplication), and disables all rules that currently fail.
  • We also ignore a few troublesome directories in the ruff config, and run ruff on the entire repo. This means tools and scripts are linted now as well.
  • I also fixed a handful of rules that were only violated in a couple files, I didn't want to add a rule to the CI ignore list if fixing the rule was a one line change.

The benefits of this are:

  • There is now only one file (pyproject.toml) that needs to be modified to add new rules
  • We can now locally run the same ruleset as CI with ruff --config .github/workflows/ruff.toml

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@vincentmacri vincentmacri added github actions Pull requests that update GitHub Actions code t: refactoring labels Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github actions Pull requests that update GitHub Actions code s: needs review t: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant