-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
238 lines (225 loc) · 6.7 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
repos:
- repo: https://github.com/PyCQA/docformatter
rev: eb1df347edd128b30cd3368dddc3aa65edcfac38
hooks:
- id: docformatter
args: [--in-place, --wrap-descriptions=79, --style=google]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/psf/black.git
rev: 24.4.0
hooks:
- id: black
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.0
hooks:
- id: nbqa-black
name: nbqa-black
description: Run 'black' on a Jupyter Notebook
entry: nbqa black
language: python
require_serial: true
types_or: [jupyter, markdown]
additional_dependencies: [black]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==24.2.0
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.0
hooks:
- id: nbqa-pyupgrade
name: nbqa-pyupgrade
description: Run 'pyupgrade' on a Jupyter Notebook
entry: nbqa pyupgrade
language: python
require_serial: true
types_or: [jupyter, markdown]
additional_dependencies: [pyupgrade]
- id: nbqa-isort
name: nbqa-isort
description: Run 'isort' on a Jupyter Notebook
entry: nbqa isort
language: python
require_serial: true
types_or: [jupyter, markdown]
additional_dependencies: [isort]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
args:
- --ignore-regex=^\s*"image\/(jpeg|png|gif|bmp|tiff)":\s.*
- --ignore-regex=[A-Za-z0-9+/]{100,}
- --skip=*.js,*.html,*.css,*.svg",*.json,*.png,*.jpg,*.yml,*.yaml
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.0
hooks:
- id: nbqa-flake8
args:
- --ignore=E501,E712,W291,F632,E203,F821,F403
- --exclude=.*,__init__.py
name: nbqa-flake8
description: Run 'flake8' on a Jupyter Notebook
entry: nbqa flake8
language: python
require_serial: true
types_or: [jupyter, markdown]
additional_dependencies:
- flake8-variables-names
- pep8-naming
- flake8-functions-names
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
args:
- --ignore=E501,E712,W291,F632,E203,F821,F403
- --exclude=.*,__init__.py
additional_dependencies:
- flake8-variables-names
- pep8-naming
- flake8-functions-names
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.0
hooks:
- id: nbqa-mypy
name: nbqa-mypy
description: Run 'mypy' on a Jupyter Notebook
entry: nbqa mypy
language: python
require_serial: true
types_or: [jupyter, markdown]
additional_dependencies:
- mypy
- pandas-stubs
- git+https://github.com/numpy/numpy-stubs
- mypy-extensions
- types-requests
- types-PyYAML
- types-setuptools
args:
# - --cache-dir=/dev/null
# - --cache-dir=nul
# - --no-incremental
- --non-interactive
- --install-types
- --explicit-package-bases
- --ignore-missing-imports
- --disallow-untyped-calls
- --disallow-untyped-defs
- --disallow-untyped-decorators
- --strict
- --extra-checks
- --disallow-any-decorated
- --disallow-any-generics
- --local-partial-types
- --pretty
- --force-uppercase-builtins
- --force-union-syntax
- --warn-unreachable
- --warn-redundant-casts
- --warn-return-any
- --disallow-any-explicit
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
args:
# - --cache-dir=/dev/null
# - --cache-dir=nul
# - --no-incremental
- --non-interactive
- --install-types
- --explicit-package-bases
- --ignore-missing-imports
- --disallow-untyped-calls
- --disallow-untyped-defs
- --disallow-untyped-decorators
- --strict
- --extra-checks
- --disallow-any-decorated
- --disallow-any-generics
- --local-partial-types
- --pretty
- --force-uppercase-builtins
- --force-union-syntax
- --warn-unreachable
- --warn-redundant-casts
- --warn-return-any
- --disallow-any-explicit
additional_dependencies:
- mypy
- pandas-stubs
- git+https://github.com/numpy/numpy-stubs
- mypy-extensions
- types-requests
- types-PyYAML
- types-setuptools
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.0
hooks:
- id: nbqa-pylint
name: nbqa-pylint
description: Run 'pylint' on a Jupyter Notebook
entry: nbqa pylint
language: python
require_serial: true
types_or: [jupyter, markdown]
additional_dependencies: [pylint]
args:
- --ignore=no_check*,__init__.py
- --max-line-length=79
- --const-naming-style=any
- --disable=E0401,W0104,R0903,R1721
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.3.1
hooks:
- id: pylint
name: pylint
entry: pylint
language: python
types: [python]
args:
[
"--ignore=no_check*,__init__.py",
"--max-line-length=79",
"--const-naming-style=any",
"--disable=E0401,W0104,R0903,R1721",
]
additional_dependencies: [pylint]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.0
hooks:
- id: nbqa-pydocstyle
name: nbqa-pydocstyle
description: Run 'pydocstyle' on a Jupyter Notebook
entry: nbqa pydocstyle
language: python
require_serial: true
types_or: [jupyter, markdown]
additional_dependencies: [pydocstyle]