1- --- # ← document start required by yamllint
2- # ---------------------------------------------------------------------------
3- # Global pre‑commit settings
4- # ---------------------------------------------------------------------------
1+ --- # ← document start (keeps yamllint happy)
52minimum_pre_commit_version : " 3.6.0"
63
74default_language_version :
8- python : python3.13 # project’s baseline interpreter
5+ python : python3.11 # match your Poetry env (3.11.x)
96
107ci :
11- autofix : true # rewrite files, then fail so diff is visible
8+ autofix : true # rewrite files, then fail so diff is visible
129fail_fast : true
13- default_stages : [pre-commit, pre-push]
10+ default_stages : [pre-commit, pre-push] # was [commit, push]
1411
15- # ---------------------------------------------------------------------------
16- # Repositories & hooks
17- # ---------------------------------------------------------------------------
1812repos :
19- # ---------------------------------------------------- House‑ keeping hooks
13+ # ---------------------------------------------------- House- keeping hooks
2014 - repo : https://github.com/pre-commit/pre-commit-hooks
2115 rev : v5.0.0
2216 hooks :
@@ -47,46 +41,50 @@ repos:
4741 hooks :
4842 - id : shfmt
4943 args : ["-i", "2", "-sr", "-ci"]
44+ files : " ^scripts/.*\\ .sh$" # only format our scripts/
45+ exclude : " ^docker/" # avoid parsing docker/orchestrate.sh for now
5046
5147 - repo : https://github.com/koalaman/shellcheck-precommit
5248 rev : v0.10.0
5349 hooks :
5450 - id : shellcheck
5551 args : ["--severity", "warning"]
52+ files : " ^scripts/.*\\ .sh$"
53+ exclude : " ^docker/"
5654
5755 # ----------------------------------- Python formatters & linters stack
5856 - repo : https://github.com/psf/black
5957 rev : 25.1.0
6058 hooks :
6159 - id : black
62- language_version : python3.13
60+ language_version : python3.11 # <-- was python3. 13
6361
6462 - repo : https://github.com/PyCQA/isort
6563 rev : 6.0.1
6664 hooks :
6765 - id : isort
6866 args : ["--profile", "black"]
69- language_version : python3.13
67+ language_version : python3.11 # <-- was python3. 13
7068
7169 - repo : https://github.com/astral-sh/ruff-pre-commit
72- rev : v0.11.8 # bundles Ruff 0.11.8 binary
70+ rev : v0.11.9 # keep in sync with your lockfile/ruff version
7371 hooks :
74- # 1 Formatter (runs first)
75- # - id: ruff-format
76- # stages: [pre-commit]
77- # exclude: "build/|dist/|\\.venv/|\\.eggs/|\\.mypy_cache/|\\.ruff_cache/"
72+ # If you want the formatter, uncomment:
73+ # - id: ruff-format
74+ # stages: [commit]
7875
79- # 2 Linter + auto‑ fix on commit
76+ # Linter + auto- fix on commit
8077 - id : ruff
8178 name : ruff-lint-fix
82- args : ["--fix", "--exit-non-zero-on-fix", "--show-fixes", "--unsafe-fixes"]
83- stages : [pre-commit]
79+ args :
80+ ["--fix", "--exit-non-zero-on-fix", "--show-fixes", "--unsafe-fixes"]
81+ stages : [pre-commit] # <-- was [commit]
8482
85- # 3 Strict linter on push/CI (no fixes)
83+ # Strict linter on push/CI (no fixes)
8684 - id : ruff
8785 name : ruff-lint-ci
8886 args : ["--show-source"]
89- stages : [pre-push]
87+ stages : [pre-push] # <-- was [push]
9088
9189 - repo : local
9290 hooks :
@@ -98,14 +96,3 @@ repos:
9896 files : " \\ .py$"
9997 pass_filenames : false
10098 always_run : true
101-
102-
103- # ---------------------------------------------------------------------------
104- # Optional – MyPy strict typing (uncomment when ready)
105- # ---------------------------------------------------------------------------
106- # - repo: https://github.com/pre-commit/mirrors-mypy
107- # rev: v1.10.0
108- # hooks:
109- # - id: mypy
110- # additional_dependencies: ["types-requests"]
111- # args: ["--strict"]
0 commit comments