Conversation
ruff was unpinned, so CI silently picked up 0.16.0's much larger default rule set and started failing. Pin the version and fix (or, for a few deliberately-broad-except/temp-file/naive-datetime patterns, suppress with a documented reason) the resulting violations. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
ruffwas unpinned inpyproject.toml. Ruff 0.16.0 nearly doubles the default enabled rule set (115 → 199 rules for a typical file), and since CI installs dependencies viauv pip install -e .[all]rather thanuv sync, it silently picked up 0.16.0 and started failing lint across the repo with ~5,400 new violations.ruff>=0.16.0,<0.17and regenerateuv.lockso a future release can't silently break CI again.typing.Dict/List/Optional→ builtin generics and similar modernization, plus a smaller set of hand-fixed items (merged nestedifs, a fewValueError/RuntimeError→TypeErrorwhere the raise is a genuine type-dispatch failure, deadglobaldeclarations, redundant exception logging, a real late-binding closure bug in a test, a docstring that was accidentally an f-string, a mutable-default-argument fix, and file-permission mismatches on 5 scripts).BLE001— this codebase intentionally catches broad exceptions in checkpoint/cleanup/resilience paths.I001— import order is already owned byisort(make style-check); ruff's own sorter disagreed with isort on onetest.*edge case.tempfile.NamedTemporaryFile(delete=False)and naivedatetime.now()/.today()call sites as-is with per-linenoqawhere they're deliberate (manual temp-file lifecycle, human-facing local-time display) rather than rewriting working code to satisfy a new rule.Test plan
isort --check .,black --check .,ruff check .,mypy src/all passtest_gcs_functionality, requires live GCS credentials only available via CI secrets) unrelated to this change