Stop dependabot from opening ruff pre-commit bumps - #6965
Open
albertvillanova wants to merge 1 commit into
Open
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
This PR stops dependabot from opening ruff pre-commit bumps, while leaving the rest of the pre-commit hooks on their weekly schedule.
Motivation
Ruff bumps are pure cost for us. They reformat code and rewrite source through
--fix, and they report nothing new under our own rule selection: ruff 0.13.3 and 0.16.4 both pass on every tracked Python file once the rule set is explicit. #6957 is the current example, red on the quality job and rewriting 42 files.Freezing ruff is a deliberate choice rather than neglect, so it belongs in the config next to the reason, not in dependabot's per-repo dismissal state.
doc-builder bumps stay valuable and must keep flowing. #6956 is a live example.
Solution
Add an
ignoreentry naming the ruff hook, taken verbatim from thedependency-namethat dependabot writes in its own commit trailers.ignoreis per dependency, so doc-builder and both github-actions ecosystems are unaffected.The entry carries no
versionsorupdate-typesfilter, which ignores every update for that dependency. A semver filter would be the natural way to allow patch releases only, but it is not usable here: dependabot does not report an update type for pre-commit hooks, and ruff 0.13.3 is in any case the last release of the 0.13 line, so a patch-only rule would never match anything.The comment above the entry no longer describes reality once ruff is ignored, so it is reworded to state the remaining rationale for not grouping.
Changes
Note
Low Risk
CI/dependency automation only; no runtime or application code changes.
Overview
Dependabot’s pre-commit ecosystem entry now ignores all updates for
https://github.com/astral-sh/ruff-pre-commit, with an inline comment that ruff is frozen on purpose (bumps reformat and--fixwithout new findings under the project’s rules) and should be bumped manually when needed.The comment above the ungrouped pre-commit block is reworded so it no longer cites keeping ruff separate from doc-builder; it now says each remaining hook bump should stay reviewable on its own. Weekly pre-commit updates for other hooks (e.g. doc-builder) and github-actions entries are unchanged.
Reviewed by Cursor Bugbot for commit 9c17f2f. Bugbot is set up for automated code reviews on this repo. Configure here.