chore: align local ruff with CI's dependency window#9730
Closed
kirangadhave wants to merge 1 commit into
Closed
Conversation
Align local lint with CI by pinning ruff everywhere (.pre-commit-config.yaml rev, pyproject.toml dev floor) and committing the resulting import-relocation and unused-import autofixes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
didn't realize the ruff version was released recently. |
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.
Problem
make py-checkrunsuv run ruff check --fix, which re-resolves ruff rather than using a frozen lock (uv.lockis gitignored). Locally there was no upper bound, so it floated to whatever ruffuvresolved at setup time (observed 0.15.13 / 0.15.14 / 0.15.15 across environments). CI's lint job (test_checkintest_be.yaml) runs the same command but withUV_EXCLUDE_NEWER: "7 days", so CI resolves the latest ruff aged ≥7 days. The newer local ruff ships detections/fixes (TC002/TC003import moves, unused-import removals) that CI's windowed version lacks, so local checks rewrote files CI considered clean.Fix
Make local resolution reproduce CI's window at setup time:
pyproject.toml: add[tool.uv] exclude-newer = "7 days", mirroring CI'sUV_EXCLUDE_NEWER. Localuv run/uv locknow resolve the same ruff (and other deps) CI would resolve when you set up. This is point-in-time: a fresh setup matches CI; a stale checkout matches once re-locked..pre-commit-config.yaml: pinruff-pre-committo the version that window currently resolves (v0.15.14), since pre-commit.ci installs from the tag and isn't governed by the window. Renovate (minimumReleaseAge: 7 days) keeps the tag tracking.TYPE_CHECKING.No version is hard-pinned; the floor stays
ruff>=0.15.9and the window controls the upper bound.Verification
uv run ruff --version-> 0.15.14 (== pre-commit rev == CI's windowed resolution)uv run ruff check . && uv run ruff format --check .-> cleanuvx ruff@0.15.14 check .-> All checks passeduvx pre-commit run ruff-check/ruff-format --all-files-> Passedmake py-check-> lint, format, typecheck (713 files), lock all passtests/_runtime/test_manage_script_metadata.py-> 14 passed