From 71d6cd184c9186e216c69e9d8ec3db2c74b41df4 Mon Sep 17 00:00:00 2001 From: Andre Manoel Date: Wed, 18 Mar 2026 14:56:16 +0000 Subject: [PATCH 1/3] chore: bump ruff pre-commit hook to v0.15.5 The pre-commit hook was pinned at v0.12.3 while pyproject.toml requires >=0.14.10 (resolving to 0.15.5). This version mismatch caused the pre-commit formatter to produce output that CI's ruff rejected. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b8f0addd6..0a17c8234 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: # Ruff - linting and formatting (using your existing ruff config) - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.3 + rev: v0.15.5 hooks: # Run the linter - id: ruff From 667d0fec064929590b8a8de64c2165615c12d336 Mon Sep 17 00:00:00 2001 From: Andre Manoel Date: Wed, 18 Mar 2026 14:58:36 +0000 Subject: [PATCH 2/3] chore: use local ruff from .venv instead of ruff-pre-commit repo Replaces the external ruff-pre-commit repo with local hooks that run .venv/bin/ruff directly. This guarantees the pre-commit ruff version always matches CI (both use the version from pyproject.toml), eliminating version drift that caused formatting mismatches. --- .pre-commit-config.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a17c8234..7d274745d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,12 +15,16 @@ repos: - id: debug-statements - id: mixed-line-ending - # Ruff - linting and formatting (using your existing ruff config) - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.5 + # Ruff - uses the project's .venv/bin/ruff so the version always matches CI + - repo: local hooks: - # Run the linter - id: ruff - args: [--fix] - # Run the formatter + name: ruff (legacy alias) + entry: .venv/bin/ruff check --fix + language: system + types: [python] - id: ruff-format + name: ruff format + entry: .venv/bin/ruff format + language: system + types: [python] From 8a20e1e05f9ffac878819bec13c6d9e9b42acc64 Mon Sep 17 00:00:00 2001 From: Andre Manoel Date: Wed, 18 Mar 2026 19:20:40 +0000 Subject: [PATCH 3/3] chore: use uv run ruff for cross-platform compatibility Replaces .venv/bin/ruff with uv run ruff so the hooks work on any platform without requiring a pre-existing venv. Also fixes the misleading "legacy alias" hook name. --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d274745d..60884d0e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,16 +15,16 @@ repos: - id: debug-statements - id: mixed-line-ending - # Ruff - uses the project's .venv/bin/ruff so the version always matches CI + # Ruff - uses uv run so the version always matches pyproject.toml - repo: local hooks: - id: ruff - name: ruff (legacy alias) - entry: .venv/bin/ruff check --fix + name: ruff (linter) + entry: uv run ruff check --fix language: system types: [python] - id: ruff-format name: ruff format - entry: .venv/bin/ruff format + entry: uv run ruff format language: system types: [python]