Skip to content

MNT: re-configuring ruff for maximal impact and minimal maintenance burden #20519

Open

Description

@neutrinoceros

This topic has been repeatedly touched for a couple years; the status quo is that we enable all linting rules, and only selectively disable the ones we deem unenforceable or inappropriate. As a result, any newly stabilized rule (which come up every couple months with ruff's feature releases) warrant churn and possibly discussion I think a majority1 would rather skip.

I propose we re-configure ruff towards an opt-in strategy (instead of the current opt-out strat).
Specifically, I propose that we opt into correctness-oriented rules but leave out purely stylistic ones.
I expect this selection will soon become much easier to perform with the categorisation being developed (and available as a preview feature) within the 0.16.x series:
https://docs.astral.sh/ruff/linter/#rule-categories

We could start by trying it out now, and consider using it before it's stabilized if we don't encounter any issue with it, or we could wait for this system to be stabilized (supposedly with ruff 0.17.0).

Footnotes

  1. myself included, as the person who most recently handled hundreds of such stylistics updates and dependency upgrades ↩

Activity

  1. added theissue type on Oct 1, 2026
  2. removed theissue type on Oct 1, 2026
  3. mhvk commented on Oct 7, 2026

    @mhvk
    Contributor

    Also an explicit 👍 to opting in to rules instead of opting out. The current process leads to too much churn and friction.

  4. taldcroft commented on Oct 8, 2026

    @taldcroft
    Member

    Yes!

  5. astrofrog commented on Oct 8, 2026

    @astrofrog
    Member

    Agree!

  6. neutrinoceros commented on Oct 9, 2026

    @neutrinoceros
    ContributorAuthor

    update: ruff 0.17.0 is now available, but doesn't stabilize rule-categories as I previously speculated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions