From fc2d5fd38048a3a24ce275068c9ac44447c68b44 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Mon, 16 Nov 2026 06:04:15 +0900 Subject: [PATCH] fix: pre-commit ruff hooks check the package source The ruff hooks matched ^(cablexsec|tests|examples|validation|release)/, but the package lives under src/cablexsec, so pre-commit never linted or formatted it and CI's lint job (ruff over src tests examples validation release doc) caught what pre-commit passed. The hooks now take the same trees as CI, and the hook rev matches the ruff CI installs (0.15.22, within the dev pin >=0.15,<0.16). The whole tree passes the hooks unchanged. Signed-off-by: Jae Hoon Seo --- .pre-commit-config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 615f43d..3d1b04b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,12 +22,13 @@ repos: args: [--maxkb=2000] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.11 + rev: v0.15.22 hooks: + # The same trees as the CI lint job (python.yml); the package is under src/. - id: ruff-check - files: ^(cablexsec|tests|examples|validation|release)/.*\.py$ + files: ^(src|tests|examples|validation|release|doc)/.*\.py$ - id: ruff-format - files: ^(cablexsec|tests|examples|validation|release)/.*\.py$ + files: ^(src|tests|examples|validation|release|doc)/.*\.py$ - repo: local hooks: