Update pre-commit hooks and adapt to ruff 0.16 - #3993
Merged
Merged
Conversation
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The hook versions are valid, and the compatibility edits preserve existing behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Updates pre-commit hooks and applies formatting/configuration changes required by Ruff 0.16.
Changes:
- Bumps shfmt, Ruff, ShellCheck, and zizmor hooks.
- Ignores newly stabilized Ruff rules and resolves new formatting violations.
- Applies Ruff formatting to Python documentation examples.
| File | Description |
|---|---|
.pre-commit-config.yaml |
Updates hook versions. |
pyproject.toml |
Ignores CPY001 and PLR0917. |
learning_resources/utils.py |
Reorders a union annotation. |
learning_resources/utils_test.py |
Parenthesizes joined strings. |
learning_resources/migrations/0120_view_event_uuid_unique_index.py |
Parenthesizes joined SQL strings. |
learning_resources/etl/utils.py |
Removes an obsolete noqa. |
learning_resources/data/README-topics.md |
Formats the Python example. |
docs/how-to/articles-to-news.md |
Formats Python examples. |
docs/articles-cdn-purge.md |
Formats Python examples. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mbertrand
force-pushed
the
mb/ruff-0.16
branch
from
September 25, 2026 17:35
a136c29 to
c84725f
Compare
umar8hassan
approved these changes
Sep 28, 2026
shanbady
self-requested a review
September 28, 2026 13:43
shanbady
approved these changes
Sep 28, 2026
mbertrand
added a commit
that referenced
this pull request
Sep 29, 2026
Address review feedback on #3993. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
updates: - [github.com/scop/pre-commit-shfmt: v3.13.1-1 → v3.14.1-1](scop/pre-commit-shfmt@v3.13.1-1...v3.14.1-1) - [github.com/astral-sh/ruff-pre-commit: v0.15.21 → v0.16.8](astral-sh/ruff-pre-commit@v0.15.21...v0.16.8) - [github.com/shellcheck-py/shellcheck-py: v0.11.0.1 → v0.11.0.1-1](shellcheck-py/shellcheck-py@v0.11.0.1...v0.11.0.1-1) - [github.com/zizmorcore/zizmor-pre-commit: v1.29.0 → v1.30.1](zizmorcore/zizmor-pre-commit@v1.29.0...v1.30.1)
for more information, see https://pre-commit.ci
Ruff 0.16 stabilized CPY001 and PLR0917, which were preview-only (and so inactive) under 0.15. Ignore both, and fix the new ISC004/RUF036 hits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test functions take pytest fixtures positionally, so ignore PLR0917 in test files. Keep it on for app code and extend the existing PLR0913 noqa comments to cover it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Address review feedback on #3993. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mbertrand
force-pushed
the
mb/ruff-0.16
branch
from
September 29, 2026 14:49
091a893 to
569572a
Compare
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 are the relevant tickets?
Replaces #3649 (pre-commit.ci autoupdate), which fails the ruff hook.
Description (What does it do?)
# noqaruff no longer needs)CPY001(769 hits) andPLR0917(37 hits) official. Before, they were preview-only and never ran. Both are added tolint.ignore.ISC004(3) andRUF036(1) hits: wraps joined strings in parentheses and movesNoneto the end of one type hint. Behaviour is unchanged.How can this be tested?
uvx ruff@0.16.8 check . --extend-ignore=D1finds nothingAdditional Context
Once this merges, #3649 can be closed. pre-commit.ci will reopen its own PR at the next autoupdate.
🤖 Generated with Claude Code