Skip to content

Commit 6722efe

Browse files
šŸ‘ TEMPLATE DEVIATIONS: synced local '.pre-commit-config.yaml' with remote 'templates/.pre-commit-config.yaml' (#50)
Co-authored-by: scitools-ci[bot] <107775138+scitools-ci[bot]@users.noreply.github.com>
1 parent 3ba0566 commit 6722efe

File tree

1 file changed

+99
-21
lines changed

1 file changed

+99
-21
lines changed

ā€Ž.pre-commit-config.yaml

Lines changed: 99 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,104 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
# See https://pre-commit.ci/#configuration
4+
# See https://github.com/scientific-python/cookie#sp-repo-review
5+
6+
ci:
7+
autofix_prs: false
8+
autoupdate_commit_msg: "chore: update pre-commit hooks"
9+
10+
11+
# Alphabetised, for lack of a better order.
12+
files: |
13+
(?x)(
14+
benchmarks\/.+\.py|
15+
docs\/.+\.py|
16+
lib\/.+\.py|
17+
noxfile\.py|
18+
pyproject\.toml|
19+
setup\.py|
20+
src\/.+\.py
21+
)
22+
minimum_pre_commit_version: 1.21.0
423

524
repos:
6-
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: "v4.6.0"
8-
hooks:
9-
# Prevent giant files from being committed.
10-
- id: check-added-large-files
11-
# Check for file name conflicts on case-insensitive file-systems.
12-
- id: check-case-conflict
13-
# Check for files that contain merge conflict strings.
14-
- id: check-merge-conflict
15-
# Check TOML file syntax.
16-
- id: check-toml
17-
# Check YAML file syntax.
18-
- id: check-yaml
19-
# Makes sure files end in a newline and only a newline
20-
- id: end-of-file-fixer
21-
# Replaces or checks mixed line ending
22-
- id: mixed-line-ending
23-
# Don't commit to main branch.
24-
- id: no-commit-to-branch
25-
# Trims trailing whitespace
26-
- id: trailing-whitespace
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v4.6.0
27+
hooks:
28+
# Prevent giant files from being committed.
29+
- id: check-added-large-files
30+
# Check whether files parse as valid Python.
31+
- id: check-ast
32+
# Check for file name conflicts on case-insensitive filesystems.
33+
- id: check-case-conflict
34+
# Check for files that contain merge conflict strings.
35+
- id: check-merge-conflict
36+
# Check for debugger imports and py37+ `breakpoint()` calls in Python source.
37+
- id: debug-statements
38+
# Check TOML file syntax.
39+
- id: check-toml
40+
# Check YAML file syntax.
41+
- id: check-yaml
42+
# Makes sure files end in a newline and only a newline.
43+
# Duplicates Ruff W292 but also works on non-Python files.
44+
- id: end-of-file-fixer
45+
# Replaces or checks mixed line ending.
46+
- id: mixed-line-ending
47+
# Don't commit to main branch.
48+
- id: no-commit-to-branch
49+
# Trims trailing whitespace.
50+
# Duplicates Ruff W291 but also works on non-Python files.
51+
- id: trailing-whitespace
52+
53+
- repo: https://github.com/astral-sh/ruff-pre-commit
54+
rev: "v0.4.4"
55+
hooks:
56+
- id: ruff
57+
types: [file, python]
58+
args: [--fix, --show-fixes]
59+
- id: ruff-format
60+
types: [file, python]
61+
62+
- repo: https://github.com/codespell-project/codespell
63+
rev: "v2.2.6"
64+
hooks:
65+
- id: codespell
66+
types_or: [asciidoc, python, markdown, rst]
67+
additional_dependencies: [tomli]
68+
69+
- repo: https://github.com/adamchainz/blacken-docs
70+
rev: 1.16.0
71+
hooks:
72+
- id: blacken-docs
73+
types: [file, rst]
74+
75+
- repo: https://github.com/aio-libs/sort-all
76+
rev: v1.2.0
77+
hooks:
78+
- id: sort-all
79+
types: [file, python]
80+
81+
- repo: https://github.com/pre-commit/mirrors-mypy
82+
rev: 'v1.10.0'
83+
hooks:
84+
- id: mypy
85+
exclude: 'noxfile\.py|docs/conf\.py'
86+
87+
- repo: https://github.com/abravalheri/validate-pyproject
88+
# More exhaustive than Ruff RUF200.
89+
rev: "v0.18"
90+
hooks:
91+
- id: validate-pyproject
92+
93+
- repo: https://github.com/scientific-python/cookie
94+
rev: 2024.04.23
95+
hooks:
96+
- id: sp-repo-review
97+
additional_dependencies: ["repo-review[cli]"]
98+
args: ["--show=errskip"]
99+
100+
- repo: https://github.com/numpy/numpydoc
101+
rev: v1.7.0
102+
hooks:
103+
- id: numpydoc-validation
104+
types: [file, python]

0 commit comments

Comments
Ā (0)