Repository navigation
vNext: Pin Ruff to 0.17.0 and fix the import it flags - #550
Merged
Merged
Conversation
Lint installed ruff>=0.16.3, so CI picked up Ruff 0.17.0 the day it came out. 0.17 sorts an import with a trailing pragma comment differently, and const.py failed I001 on every push and PR since #547. None of #547, #548 or #549 touched const.py. 0.16.10 and 0.17.0 want opposite forms of that import, so no code passes both. Pin Ruff to an exact version in lint.yml and requirements_dev.txt so a new release cannot break CI again, and apply the 0.17 fix.
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
Lint has failed on every push and PR to
5.0-devsince #547:None of #547, #548 or #549 touched
const.py.Cause
lint.ymlinstalledruff>=0.16.3. Ruff 0.17.0 came out on 2026-10-09, so CI used 0.17.0 from that day on. The last green run (#546) used 0.16.10.0.17 sorts an import with a trailing pragma comment differently. Ruff 0.16.10 and 0.17.0 want opposite forms of the same import, so no code passes both.
Change
const.py: apply the 0.17 fix (ruff check --fix).lint.ymlandrequirements_dev.txt: pin Ruff to0.17.0, so a new Ruff release cannot break CI again. A future bump goes in its own PR.docs/development.md: explain the pin.Testing
ruff check .passes,ruff format --check .passes (72 files).Notes
Contributors with an older local Ruff, or the VS Code Ruff extension with its bundled Ruff, see I001 the other way round.
pip install -r requirements_dev.txtfixes that.