-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.pre-commit-config.yaml
86 lines (79 loc) · 3.11 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
85
86
# 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: bc7af46104f0f5368b95878decf720f9f00c2559 # frozen: v3.4.2
hooks:
- id: prettier
files: \.(md|rst|yml|yaml)
args: [--prose-wrap=preserve]
- repo: https://github.com/MarcoGorelli/cython-lint
rev: 1ac5158c1b0f405350517c218f03d3a21bbb381c # frozen: v0.16.6
hooks:
- id: cython-lint
args: [--no-pycodestyle, --max-line-length=88]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 8b76f04e7e5a9cd259e9d1db7799599355f97cdf # frozen: v0.8.2
hooks:
- id: ruff
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "f56614daa94d5cd733d3b7004c5df9caad267b4a" # frozen: v1.13.0
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$
| intro/numpy/solutions/2_5_markov_chain\.py$
| intro/matplotlib/examples/plot_bar\.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