Update pre-commit hooks and ruff configuration - #272
Open
david26694 wants to merge 1 commit into
Open
Conversation
- black v25.1.0 -> v26.5.1, ruff v0.0.261 -> v0.16.3 - ruff.toml: move extend-select and ignore under the lint namespace, which silences the deprecation warning ruff emits on every run - normalise .pre-commit-config.yaml indentation - refresh uv.lock Config only. Running the updated hooks reformats source as well, mainly modernising type annotations; that is deliberately left to a follow-up so this diff stays reviewable. Until then `pre-commit run --all-files` will report changes. Note black and ruff format disagree about line length in this repo: ruff.toml sets 160 while black uses its default of 88. Formatting on save with ruff while pre-commit runs black produces churn, most visibly by joining multi-line implicit string concatenations that black then cannot split again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #272 +/- ##
=======================================
Coverage 95.17% 95.17%
=======================================
Files 18 18
Lines 2094 2094
=======================================
Hits 1993 1993
Misses 101 101 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Config only, no source changes.
What
blackv25.1.0 -> v26.5.1,ruffv0.0.261 -> v0.16.3ruff.toml: moveextend-selectandignoreunder thelintnamespace, silencing the deprecation warning ruff emits on every run.pre-commit-config.yamlindentationuv.lockDeliberately not included
Running the updated hooks also reformats source, mainly modernising type annotations (
Optional[Any]->Any | None, droppingDict/List/Optionalimports). That is left to a follow-up so this diff stays reviewable.Until that follow-up lands,
pre-commit run --all-fileswill report changes.Known issue this does not fix
blackandruff formatdisagree about line length in this repo:ruff.tomlsets 160,blackuses its default of 88. Formatting on save with ruff while pre-commit runs black produces churn in both directions.The most visible symptom is implicit string concatenation.
ruff formatjoinsinto a single 130-character literal, which fits under 160.
blackcannot split it again, because merging the two literals removed the concatenation point, andE501is ignored. So the change is one-way and sticks.Worth settling separately, by aligning the two line lengths or dropping one of the formatters.
🤖 Generated with Claude Code