Skip to content

feat: upgrade ruff pre-commit hook to v0.15.1 and general to v6#29

Open
newtob wants to merge 4 commits intoritwiktiwari:mainfrom
newtob:feat--update-ruff-pre-commit-hook-to-v0.15.1
Open

feat: upgrade ruff pre-commit hook to v0.15.1 and general to v6#29
newtob wants to merge 4 commits intoritwiktiwari:mainfrom
newtob:feat--update-ruff-pre-commit-hook-to-v0.15.1

Conversation

@newtob
Copy link
Contributor

@newtob newtob commented Feb 19, 2026

Upgraded two pre-commit hooks

  • Ruff to v0.15.1, over a year jump, this fixes some inconsistencies with the version managed by uv, and reduces two types of unecessary checks
  • General hooks to v6, a less valuable update which improves error messages, but does drop support for Python <= 3.8
    https://github.com/pre-commit/pre-commit-hooks/releases

Summary by CodeRabbit

  • Chores
    • Updated pre-commit hook versions to latest stable releases
    • Cleaned up workflow configuration formatting

@ritwiktiwari
Copy link
Owner

@newtob thanks for bumping up the versions!

Could you also take a look at why tests are failing?

@newtob
Copy link
Contributor Author

newtob commented Feb 20, 2026

Hi,
The tests are failing because the PR can't check out main:

Command line: | /usr/bin/git -c core.fsmonitor=false checkout -f main
E           Stderr:       | error: pathspec 'main' did not match any file(s) known to git

I think the following needs to be run in advance of the test stage:
git fetch origin main

I am absolutely loving Copier-Astral. It's very cool!

Thanks,
Ben

@ritwiktiwari
Copy link
Owner

@newtob thanks again!

I’ve fixed the filing tests. Once all checks are passing, please rebase your branch and we’ll get your PR merged.

Thank you for your contributions.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
template/{% if include_prek %}.pre-commit-config.yaml{% endif %}.jinja (1)

20-23: Consider updating hook id from ruff to ruff-check.

The official Ruff documentation now uses ruff-check as the hook id with args: [ --fix ] for the linter. The ruff hook id still works but ruff-check is the documented approach.

♻️ Proposed update to align with official documentation
   - repo: https://github.com/astral-sh/ruff-pre-commit
     rev: v0.15.1
     hooks:
-      - id: ruff
+      - id: ruff-check
         args: [--fix]
       - id: ruff-format
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@template/`{% if include_prek %}.pre-commit-config.yaml{% endif %}.jinja
around lines 20 - 23, Update the pre-commit hook id from "ruff" to the
documented "ruff-check" while keeping the existing args: [--fix]; locate the
hooks block that currently lists "- id: ruff" and change that identifier to "-
id: ruff-check" (leave the "- id: ruff-format" entry as-is).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@template/`{% if include_prek %}.pre-commit-config.yaml{% endif %}.jinja:
- Around line 20-23: Update the pre-commit hook id from "ruff" to the documented
"ruff-check" while keeping the existing args: [--fix]; locate the hooks block
that currently lists "- id: ruff" and change that identifier to "- id:
ruff-check" (leave the "- id: ruff-format" entry as-is).

Repository owner deleted a comment from coderabbitai bot Feb 22, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6ce3b522-3d29-47f7-8c3c-5646a12122ec

📥 Commits

Reviewing files that changed from the base of the PR and between e065bdb and 7b225de.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • template/{% if include_prek %}.pre-commit-config.yaml{% endif %}.jinja
💤 Files with no reviewable changes (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

This PR contains minimal cosmetic and dependency updates: removal of extraneous blank lines in CI workflow configuration and version bumps for pre-commit hook dependencies to their latest releases.

Changes

Cohort / File(s) Summary
CI Workflow Formatting
.github/workflows/ci.yml
Removed 2 extraneous blank lines around the semgrep job in the sast_with_semgrep workflow. No functional logic changes.
Pre-commit Dependency Updates
template/{% if include_prek %}.pre-commit-config.yaml{% endif %}.jinja
Updated pre-commit hook versions: general hooks v5.0.0 → v6.0.0 and Ruff hooks v0.8.4 → v0.15.1. Control flow and hook structure remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 Blank lines begone, versions do climb,
Pre-commit and workflows now redesigned,
Ruff shines brighter, general hooks glow,
Tidy CI pipelines steal the show! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main changes: upgrading ruff to v0.15.1 and general pre-commit hooks to v6, which matches the primary file modification in the template pre-commit config.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable the changed files summary in the walkthrough.

Disable the reviews.changed_files_summary setting to disable the changed files summary in the walkthrough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants