Chore: Pin ruff rule selection - #103
Merged
tykeal merged 1 commit intoJul 29, 2026
Merged
Conversation
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 14:10
View session
There was a problem hiding this comment.
Pull request overview
Adds an explicit Ruff configuration file to pin the repo’s lint rule selection, avoiding unexpected rule-set changes when the Ruff/pre-commit hook version is updated.
Changes:
- Introduces a standalone
.ruff.toml(since there’s nopyproject.toml) with an explicit[lint] selectlist. - Defines a small ignore list (
E501,B008) and test-specific per-file ignores to prevent future select-expansions from immediately flagging test suites.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tykeal
previously approved these changes
Jul 28, 2026
tykeal
left a comment
Contributor
There was a problem hiding this comment.
🤖 Dependamerge
Approved this pull request ✅
ModeSevenIndustrialSolutions
force-pushed
the
chore/pin-ruff-rule-selection
branch
from
July 28, 2026 16:50
a0f1262 to
cc83c98
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 16:51
View session
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 17:20
View session
This repository runs the ruff hook with no ruff configuration, so it
applies whatever ruff's *default* rule set happens to be. That default
is not stable across releases:
ruff 0.15.22 -> 59 rules across 2 categories (E, F)
ruff 0.16.0 -> 413 rules across 38 categories
A routine pre-commit autoupdate crossing that boundary changed which
rules run and broke fifteen repositories in this organisation at once,
on code nobody had touched. Ninety-six repositories carry the hook
with no configuration, so all of them are exposed to the next bump.
Pin the rule set to the de-facto house style, which appears as a
superset in 13 of the 16 repositories that already pin their own. This
does not decline the unselected rules; it makes adopting them a
deliberate, reviewed change rather than a side effect of a version bump.
line-length and target-version are left unset on purpose. Both alter
existing behaviour -- target-version changes which pyupgrade rules fire
-- and the aim here is to fix which rules run, nothing else.
No code changes accompany this: the tree is already clean under the
pinned rule set, verified with ruff 0.16.0 against the files the hook
currently selects.
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
force-pushed
the
chore/pin-ruff-rule-selection
branch
from
July 28, 2026 17:30
dbcb4d4 to
139d14a
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 18:14
View session
tykeal
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This repo runs the ruff hook with no ruff configuration, so it applies whatever ruff's default rule set happens to be. That default is not stable across releases — verified directly:
A 7× expansion in a patch-level bump. The routine autoupdate that crossed it broke 15 repos in this org simultaneously on untouched code — including this one, where #102 is blocked.
What
Not invented — this is the de facto house style, a superset in 13 of the 16 org repos that already pin their rules.
A standalone
.ruff.tomlbecause this repo has nopyproject.toml.Selecting these categories switches every other rule off — that is the point. Adopting them becomes a deliberate, reviewed change rather than a side effect of a version bump.
line-lengthandtarget-versionare left unset on purpose — both would change behaviour rather than pin it (target-versionalters whichpyupgraderules fire). Standardising those is separate work.Effect on #102
The single blocking violation falls outside the pinned set and ceases to exist:
EXE001ontests/test-projects.py:1(shebang present, file not executable).EXEis not selected.Worth noting the alternative was to delete a shebang from a file that is mode
644and never invoked directly — a change with no benefit beyond satisfying a rule the org had not chosen to adopt.Validation
ruff check --show-settingsconfirms enabled categories drop from 38 toB C E F I UP Wpre-commit run --all-files→ all hooks pass