-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
141 lines (124 loc) · 3.02 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: >
(?x)^(
.*\.bib|
.*\.svg|
\.cspell\.json
)$
- id: mixed-line-ending
- id: name-tests-test
name: Tests should start with test_
args: ["--django"]
- id: trailing-whitespace
- repo: https://github.com/ComPWA/repo-maintenance
rev: 0.0.12
hooks:
- id: check-dev-files
- id: fix-first-nbcell
args:
- --colab
- --replace
- id: fix-nbformat-version
- repo: https://github.com/asottile/blacken-docs
rev: v1.10.0
hooks:
- id: blacken-docs
- repo: https://github.com/ComPWA/mirrors-cspell
rev: v5.3.12
hooks:
- id: cspell
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.3.5
hooks:
- id: editorconfig-checker
exclude: >
(?x)^(
.*\.py
)$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.27.1
hooks:
- id: markdownlint
- repo: https://github.com/nbQA-dev/nbQA
rev: 0.6.0
hooks:
- id: nbqa-black
args: [--nbqa-mutate]
- id: nbqa-flake8
args: ["--extend-ignore=E402,F821"]
- id: nbqa-isort
args: [--nbqa-mutate]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
hooks:
- id: prettier
language_version: 12.18.2 # prettier does not specify node correctly
- repo: https://github.com/ComPWA/mirrors-pyright
rev: v1.1.130
hooks:
- id: pyright
# The following tools have to be install locally, because they can also be
# used by code editors (e.g. linting and format-on-save).
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types:
- python
- id: flake8
name: flake8
entry: flake8
language: system
types:
- python
- id: isort
name: isort
entry: isort
language: system
types:
- python
- id: mypy
name: mypy
entry: mypy
language: system
types:
- python
- id: nbstripout
name: nbstripout
entry: nbstripout
language: system
types:
- jupyter
- id: pydocstyle
name: pydocstyle
entry: pydocstyle
language: system
types:
- python
- id: pylint
name: pylint
entry: pylint
args:
- --rcfile=.pylintrc
- --score=no
language: system
types:
- python