Skip to content

chore(deps-dev): pin ruff lint rule set to historic default - #23

Merged
bgrant merged 1 commit into
mainfrom
chore/pin-ruff-lint-rule-set
Aug 7, 2026
Merged

chore(deps-dev): pin ruff lint rule set to historic default#23
bgrant merged 1 commit into
mainfrom
chore/pin-ruff-lint-rule-set

Conversation

@bgrant

@bgrant bgrant commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Pin the ruff lint rule set to the historic default so a future ruff 0.16.x upgrade stays behavior-neutral.

ruff 0.16 expanded its default lint rule set (roughly 59 to 413 rules). This project's [tool.ruff] sets no explicit select, so it inherits whatever ruff's default is. When ruff 0.16 is installed, ruff check . (the static / test-all targets) begins failing on newly-default rules that fire on existing code — I001 (import sorting) and LOG009 (undocumented logging.WARN constant).

This change:

  • Sets lint.select = ["E4", "E7", "E9", "F"] to pin the historic default rule categories (E + F).
  • Moves the settings under the lint. section, which also clears ruff's top-level linter settings are deprecated warning.
  • Preserves the existing C901 complexity check via lint.extend-select.

Adopting the newly-default rule categories is left as a separate, deliberate decision.

Verification

ruff 0.16.0 check . against this branch reports All checks passed! (exit 0), with no deprecation warning. Without the pin, the same ruff 0.16.0 run reports 4 errors (I001, LOG009 x2) and fails the build.

Context

This unblocks the pending Dependabot dev-dependencies bump (#22), which widens the ruff ceiling to <0.17.0 and currently fails CI for exactly this reason.

ruff 0.16 expands its default lint rule set (~59 -> 413 rules). This repo
sets no explicit select, so a bump to ruff 0.16 (e.g. widening the version
ceiling to <0.17) makes 'ruff check' fail on newly-default rules (I001,
LOG009). Pin the historic default (E + F, plus the existing C901) and move
the settings under the [lint] section so a 0.16 upgrade is behavior-neutral;
adopting the new categories is a separate, deliberate decision.
@bgrant
bgrant force-pushed the chore/pin-ruff-lint-rule-set branch from 0b95bd7 to fdf9942 Compare August 7, 2026 20:31
@bgrant
bgrant enabled auto-merge (squash) August 7, 2026 20:36
@bgrant
bgrant merged commit cd1b069 into main Aug 7, 2026
8 checks passed
@bgrant
bgrant deleted the chore/pin-ruff-lint-rule-set branch August 7, 2026 21:28
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