11# To run all pre-commit checks, use:
22#
3- # pre-commit run -a
3+ # uvx prek run -a
44#
55# To install pre-commit hooks that run every time you commit:
66#
7- # pre-commit install
7+ # uv tool install prek
8+ # prek install
89#
910
1011ci :
1112 autoupdate_commit_msg : " ⬆️🪝 update pre-commit hooks"
12- autofix_commit_msg : " 🎨 pre-commit fixes"
1313 autoupdate_schedule : quarterly
14+ autofix_commit_msg : " 🎨 pre-commit fixes"
1415 skip : [ty-check]
1516
1617repos :
17- # Standard hooks
18+ # Priority 0: Fast validation and independent fixers
19+
20+ # # Standard hooks
1821 - repo : https://github.com/pre-commit/pre-commit-hooks
1922 rev : v6.0.0
2023 hooks :
21- - id : check-added-large-files
22- args : ["--maxkb=2048"]
23- - id : check-case-conflict
24- - id : check-vcs-permalinks
2524 - id : check-merge-conflict
26- - id : check-symlinks
27- - id : check-json
28- - id : check-toml
29- - id : check-yaml
30- - id : debug-statements
25+ priority : 0
3126 - id : end-of-file-fixer
32- - id : mixed-line-ending
27+ priority : 1
3328 - id : trailing-whitespace
29+ priority : 1
3430
35- # Clean jupyter notebooks
36- - repo : https://github.com/srstevenson/nb-clean
37- rev : 4.0.1
38- hooks :
39- - id : nb-clean
40- args :
41- - --remove-empty-cells
42- - --preserve-cell-metadata
43- - raw_mimetype
44- - --
45-
46- # Handling unwanted unicode characters
47- - repo : https://github.com/sirosen/texthooks
48- rev : 0.7.1
49- hooks :
50- - id : fix-ligatures
51- - id : fix-smartquotes
52-
53- # Check for common mistakes
54- - repo : https://github.com/pre-commit/pygrep-hooks
55- rev : v1.10.0
56- hooks :
57- - id : rst-backticks
58- - id : rst-directive-colons
59- - id : rst-inline-touching-normal
60-
61- # Ensure uv lock file is up-to-date
62- - repo : https://github.com/astral-sh/uv-pre-commit
63- rev : 0.9.28
64- hooks :
65- - id : uv-lock
66-
67- # Python linting and formatting using ruff
68- - repo : https://github.com/astral-sh/ruff-pre-commit
69- rev : v0.14.14
70- hooks :
71- - id : ruff-check
72- - id : ruff-format
73-
74- # Also run Black on examples in the documentation
75- - repo : https://github.com/adamchainz/blacken-docs
76- rev : 1.20.0
77- hooks :
78- - id : blacken-docs
79- additional_dependencies : [black==25.*]
80-
81- # Check for license headers
82- - repo : https://github.com/emzeat/mz-lictools
83- rev : v2.9.0
31+ # # Check the pyproject.toml file
32+ - repo : https://github.com/henryiii/validate-pyproject-schema-store
33+ rev : 2026.01.22
8434 hooks :
85- - id : license-tools
35+ - id : validate-pyproject
36+ priority : 0
8637
87- # Format configuration files with prettier
88- - repo : https://github.com/rbubley/mirrors-prettier
89- rev : v3.8 .1
38+ # # Check JSON schemata
39+ - repo : https://github.com/python-jsonschema/check-jsonschema
40+ rev : 0.36 .1
9041 hooks :
91- - id : prettier
92- types_or : [yaml, markdown, html, css, scss, javascript, json]
42+ - id : check-github-workflows
43+ priority : 0
44+ - id : check-readthedocs
45+ priority : 0
9346
94- # Static type checking using ty
47+ # # Catch common capitalization mistakes
9548 - repo : local
9649 hooks :
97- - id : ty-check
98- name : ty check
99- entry : uv run ty check
100- language : unsupported
101- require_serial : true
102- types_or : [python, pyi, jupyter]
103- exclude : ^(docs/)
50+ - id : disallow-caps
51+ name : Disallow improper capitalization
52+ language : pygrep
53+ entry : ' \b(?:Numpy|Github|PyTest|Mqt|Tum)\b'
54+ exclude : .pre-commit-config.yaml
55+ priority : 0
10456
105- # Check for spelling
57+ # # Check for spelling
10658 - repo : https://github.com/adhtruong/mirrors-typos
10759 rev : v1.42.3
10860 hooks :
10961 - id : typos
62+ priority : 0
11063
111- # Catch common capitalization mistakes
112- - repo : local
113- hooks :
114- - id : disallow-caps
115- name : Disallow improper capitalization
116- language : pygrep
117- entry : PyBind|Numpy|Cmake|CCache|Github|PyTest|Mqt|Tum
118- exclude : \.pre-commit-config\.yaml|\.joblib$
119-
120- # Check best practices for scientific Python code
64+ # # Check best practices for scientific Python code
12165 - repo : https://github.com/scientific-python/cookie
12266 rev : 2025.11.21
12367 hooks :
12468 - id : sp-repo-review
12569 additional_dependencies : ["repo-review[cli]"]
70+ priority : 0
12671
127- # Check JSON schemata
128- - repo : https://github.com/python-jsonschema/check-jsonschema
129- rev : 0.36.1
72+ # # Check for license headers
73+ - repo : https://github.com/emzeat/mz-lictools
74+ rev : v2.9.0
13075 hooks :
131- - id : check-dependabot
132- - id : check-github-workflows
133- - id : check-readthedocs
76+ - id : license-tools
77+ priority : 0
13478
135- # Check the pyproject.toml file
136- - repo : https://github.com/henryiii/validate-pyproject-schema-store
137- rev : 2026.01.22
79+ # # Ensure uv lock file is up-to-date
80+ - repo : https://github.com/astral-sh/uv-pre-commit
81+ rev : 0.9.28
13882 hooks :
139- - id : validate-pyproject
83+ - id : uv-lock
84+ priority : 0
14085
141- # Tidy up BibTeX files
86+ # # Tidy up BibTeX files
14287 - repo : https://github.com/FlamingTempura/bibtex-tidy
14388 rev : v1.14.0
14489 hooks :
@@ -155,3 +100,48 @@ repos:
155100 " --trailing-commas" ,
156101 " --remove-empty-fields" ,
157102 ]
103+ priority : 0
104+
105+ # Priority 1: Second-pass fixers
106+
107+ # # Format configuration files with prettier
108+ - repo : https://github.com/rbubley/mirrors-prettier
109+ rev : v3.8.1
110+ hooks :
111+ - id : prettier
112+ types_or : [yaml, markdown, html, css, scss, javascript, json]
113+ priority : 1
114+
115+ # # Python linting using ruff
116+ - repo : https://github.com/astral-sh/ruff-pre-commit
117+ rev : v0.14.14
118+ hooks :
119+ - id : ruff-format
120+ priority : 1
121+ - id : ruff-check
122+ require_serial : true
123+ priority : 2
124+
125+ # Priority 2+: Final checks and fixers
126+
127+ # # Also run Black on examples in the documentation (needs to run after ruff format)
128+ - repo : https://github.com/adamchainz/blacken-docs
129+ rev : 1.20.0
130+ hooks :
131+ - id : blacken-docs
132+ language : python
133+ additional_dependencies : [black==26.*]
134+ priority : 2
135+
136+ # # Static type checking using ty (needs to run after lockfile update/ruff format, and ruff lint)
137+ - repo : local
138+ hooks :
139+ - id : ty-check
140+ name : ty check
141+ entry : uv run ty check
142+ language : unsupported
143+ require_serial : true
144+ types_or : [python, pyi, jupyter]
145+ exclude : ^(docs/)
146+ pass_filenames : false
147+ priority : 3
0 commit comments