11# See https://pre-commit.com for more information
22# See https://pre-commit.com/hooks.html for more hooks
3+ # See https://pre-commit.ci/#configuration
4+ # See https://github.com/scientific-python/cookie#sp-repo-review
35
46ci :
5- autoupdate_commit_msg : " chore: update pre-commit hooks"
7+ autofix_prs : false
8+ autoupdate_commit_msg : " chore: update pre-commit hooks"
69
710repos :
811- repo : https://github.com/pre-commit/pre-commit-hooks
@@ -18,27 +21,43 @@ repos:
1821 - id : check-merge-conflict
1922 # Check for debugger imports and py37+ `breakpoint()` calls in Python source.
2023 - id : debug-statements
24+ # Check TOML file syntax.
25+ - id : check-toml
26+ # Check YAML file syntax.
27+ - id : check-yaml
28+ # Makes sure files end in a newline and only a newline.
29+ # Duplicates Ruff W292 but also works on non-Python files.
30+ - id : end-of-file-fixer
31+ # Replaces or checks mixed line ending.
32+ - id : mixed-line-ending
2133 # Don't commit to master branch.
2234 - id : no-commit-to-branch
23- - repo : https://github.com/psf/black-pre-commit-mirror
24- rev : ' 24.10.0'
35+ # Trims trailing whitespace.
36+ # Duplicates Ruff W291 but also works on non-Python files.
37+ - id : trailing-whitespace
38+
39+
40+ - repo : https://github.com/astral-sh/ruff-pre-commit
41+ rev : " v0.7.3"
2542 hooks :
26- - id : black
43+ - id : ruff
44+ types : [file, python]
45+ args : [--fix, --show-fixes]
46+ - id : ruff-format
2747 types : [file, python]
28- args : [--config=./pyproject.toml, .]
29- - repo : https://github.com/PyCQA/flake8
30- rev : ' 7.1.1 '
48+
49+ - repo : https://github.com/codespell-project/codespell
50+ rev : " v2.3.0 "
3151 hooks :
32- # Run flake8.
33- - id : flake8
34- args : [--config=./.flake8]
52+ - id : codespell
53+ types_or : [asciidoc, python, markdown, rst]
54+ additional_dependencies : [tomli]
55+
56+
57+
3558- repo : https://github.com/pycqa/isort
3659 rev : ' 5.13.2'
3760 hooks :
38- - id : isort
39- name : isort (python)
40- types : [file, python]
41- args : [--filter-files]
4261 - id : isort
4362 name : isort (cython)
4463 types : [file, cython]
@@ -49,3 +68,28 @@ repos:
4968 hooks :
5069 - id : sort-all
5170 types : [file, python]
71+
72+ - repo : https://github.com/pre-commit/mirrors-mypy
73+ rev : ' v1.13.0'
74+ hooks :
75+ - id : mypy
76+ exclude : ' noxfile\.py|docs/conf\.py'
77+
78+ - repo : https://github.com/abravalheri/validate-pyproject
79+ # More exhaustive than Ruff RUF200.
80+ rev : " v0.23"
81+ hooks :
82+ - id : validate-pyproject
83+
84+ - repo : https://github.com/scientific-python/cookie
85+ rev : 2024.08.19
86+ hooks :
87+ - id : sp-repo-review
88+ additional_dependencies : ["repo-review[cli]"]
89+ args : ["--show=errskip"]
90+
91+ - repo : https://github.com/numpy/numpydoc
92+ rev : v1.8.0
93+ hooks :
94+ - id : numpydoc-validation
95+ types : [file, python]
0 commit comments