-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.pre-commit-config.yaml
84 lines (77 loc) · 3 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Install pre-commit hooks via
# pre-commit install
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-yaml
args: [--allow-multiple-documents]
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/rbubley/mirrors-prettier
rev: 1463d990e0801964764a375260dca598513f3be5 # frozen: v3.3.3
hooks:
- id: prettier
files: \.(md|rst|yml|yaml)
args: [--prose-wrap=preserve]
- repo: https://github.com/MarcoGorelli/cython-lint
rev: 9247866fce7128f2c0eaf4a09f437880397d4689 # frozen: v0.16.2
hooks:
- id: cython-lint
args: [--no-pycodestyle, --max-line-length=88]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 75b98813cfb7e663870a28c74366a1e99d7bfe79 # frozen: v0.6.9
hooks:
- id: ruff
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "d4911cfb7f1010759fde68da196036feeb25b99d" # frozen: v1.11.2
hooks:
- id: mypy
additional_dependencies:
- types-aiofiles
- types-requests
- pandas-stubs
- types-pillow
- matplotlib
exclude: |
(?x)(
^build/
| ^pyximages/
| conf\.py$
| .*/setup.*\.py$
| .*/demo.py$
| .*/auto_examples/
| advanced/mathematical_optimization/examples/plot_gradient_descent\.py$
| advanced/mathematical_optimization/examples/helper/compare_optimizers\.py$
| advanced/advanced_numpy/examples/view-colors\.py$
| advanced/advanced_numpy/examples/stride-diagonals\.py$
| advanced/interfacing_with_c/cython_numpy/test_cos_doubles\.py$
| advanced/interfacing_with_c/numpy_shared/test_cos_doubles\.py$
| advanced/interfacing_with_c/swig.*\.py$
| advanced/advanced_numpy/examples/myobject_test\.py$
| advanced/interfacing_with_c/numpy_shared/test_cos_doubles\.py$
| advanced/interfacing_with_c/numpy_c_api/test_cos_module_np\.py$
| intro/numpy/solutions/2_a_call_fortran\.py$
| advanced/advanced_numpy/examples/mandelplot\.py$
)
- repo: https://github.com/codespell-project/codespell
rev: 193cd7d27cd571f79358af09a8fb8997e54f8fff # frozen: v2.3.0
hooks:
- id: codespell
args: ["-w", "-L", "ans,nd,sav,mke,ags,mot,coo,whos,manuel"]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: 3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316 # frozen: v1.10.0
hooks:
# - id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal