Spaces:
Runtime error
Runtime error
Hicham Randrianarivo
commited on
Commit
·
00f4444
1
Parent(s):
486960d
add pre-commit
Browse files- .pre-commit-config.yaml +65 -0
.pre-commit-config.yaml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
exclude: '(\_pb2\.py)$|(\_pb2\_grpc.py)$'
|
2 |
+
repos:
|
3 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
4 |
+
rev: v4.1.0
|
5 |
+
hooks:
|
6 |
+
- id: trailing-whitespace
|
7 |
+
exclude: .*\.(whl|run)
|
8 |
+
- id: end-of-file-fixer
|
9 |
+
exclude: .*\.(whl|run)
|
10 |
+
- id: check-added-large-files
|
11 |
+
- id: check-merge-conflict
|
12 |
+
- id: debug-statements
|
13 |
+
- id: no-commit-to-branch
|
14 |
+
args: [--branch, main, --branch, master]
|
15 |
+
- repo: https://github.com/asottile/reorder_python_imports
|
16 |
+
rev: v2.6.0
|
17 |
+
hooks:
|
18 |
+
- id: reorder-python-imports
|
19 |
+
- repo: https://github.com/asottile/setup-cfg-fmt
|
20 |
+
rev: v1.20.0
|
21 |
+
hooks:
|
22 |
+
- id: setup-cfg-fmt
|
23 |
+
- repo: https://github.com/asottile/pyupgrade
|
24 |
+
rev: v2.31.0
|
25 |
+
hooks:
|
26 |
+
- id: pyupgrade
|
27 |
+
args: [--py38-plus]
|
28 |
+
- repo: https://github.com/asottile/add-trailing-comma
|
29 |
+
rev: v2.2.1
|
30 |
+
hooks:
|
31 |
+
- id: add-trailing-comma
|
32 |
+
- repo: https://github.com/Yelp/detect-secrets
|
33 |
+
rev: v1.1.0
|
34 |
+
hooks:
|
35 |
+
- id: detect-secrets
|
36 |
+
- repo: https://github.com/PyCQA/flake8
|
37 |
+
rev: 4.0.1
|
38 |
+
hooks:
|
39 |
+
- id: flake8
|
40 |
+
additional_dependencies:
|
41 |
+
[
|
42 |
+
'flake8-bugbear',
|
43 |
+
'flake8-comprehensions',
|
44 |
+
'flake8-builtins',
|
45 |
+
'flake8-eradicate',
|
46 |
+
'pep8-naming',
|
47 |
+
]
|
48 |
+
- repo: https://github.com/psf/black
|
49 |
+
rev: 21.12b0
|
50 |
+
hooks:
|
51 |
+
- id: black
|
52 |
+
args: [--include="(src|tests|scripts)/"]
|
53 |
+
require_serial: true
|
54 |
+
types_or: [python, pyi]
|
55 |
+
- repo: https://github.com/econchick/interrogate
|
56 |
+
rev: 1.5.0
|
57 |
+
hooks:
|
58 |
+
- id: interrogate
|
59 |
+
exclude: ^(docs/conf.py|setup.py|scripts/)
|
60 |
+
args: [--config=setup.cfg, --quiet]
|
61 |
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
62 |
+
rev: v2.5.1
|
63 |
+
hooks:
|
64 |
+
- id: prettier
|
65 |
+
types: [yaml, markdown]
|