fix: adopt ruff 0.16 defaults and pin the version CI installs - #47
Merged
Conversation
CI installs ruff unpinned (dev = ruff>=0.6) and ruff 0.16 changed the default rule set, turning every open PR red on files they never touched (import sorting plus new default rules). - Pin dev tooling to ruff>=0.16,<0.17 so CI is deterministic and a future default-set change cannot break unrelated PRs again. - Apply the 0.16 autofixes across the harness (import sorting, modern typing syntax) — mechanical, no behavior change. - Exempt typer.Option from B008 via flake8-bugbear extend-immutable- calls: typer declares CLI options through call defaults by design. - Fix the four genuine new-rule findings: a useless conditional in cli.py (RUF034), a dict() call rewritten as a literal (C408), the result-file timestamp now uses UTC explicitly (DTZ005) so artifact names are timezone-independent, and the deliberate best-effort broad catch in cost estimation is annotated (BLE001). ruff check, mypy, and the full pytest suite are green under 0.16.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
What
CI's "Python lint, types, tests" job went red on every open PR (#45, #46) over files those PRs never touched. Cause: the dev extra declares
ruff>=0.6unpinned, CI installs latest on each run, and ruff 0.16 changed its default rule set.Fix
ruff>=0.16,<0.17so lint results are deterministic; future default-set changes land as deliberate bumps, not surprise CI breakage.typer.Optionfrom B008 (flake8-bugbear.extend-immutable-calls): typer's call-in-default pattern is its documented API.cli.py,dict()call → literal in a test, result-file timestamps now explicitly UTC (timezone-independent artifact names), and an intentional broadexceptin cost estimation annotated with its rationale.Verification
ruff check pythonclean under 0.16.1,mypy pythonclean, 152 tests pass.Once merged, #45 and #46 just need a CI re-run (the lint job runs on the merge ref) — no rebase strictly required.
🤖 Generated with Claude Code