-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
83 lines (83 loc) · 2.07 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
default_stages:
- commit
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.2.0
hooks:
- id: check-added-large-files
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
exclude: &fixtures docs/
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --remove-duplicate-keys
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
hooks:
- id: pyupgrade
exclude: *fixtures
args: [--py39-plus]
- repo: https://github.com/DanielNoord/pydocstringformatter
rev: v0.5.3
hooks:
- id: pydocstringformatter
exclude: *fixtures
args: ["--split-summary-body", "--max-summary-lines=2"]
files: src
- repo: "https://github.com/timothycrosley/isort"
rev: 5.10.1
hooks:
- id: isort
exclude: *fixtures
- repo: "https://github.com/ambv/black"
rev: 22.3.0
hooks:
- id: black
exclude: *fixtures
- repo: "https://gitlab.com/pycqa/flake8"
rev: 3.9.2
hooks:
- id: flake8
exclude: *fixtures
- repo: local
hooks:
- id: pylint
exclude: *fixtures
name: pylint
entry: pylint
language: system
types: [python]
args:
- "--rcfile=.pylintrc"
- "-sn"
- "-rn"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.981
hooks:
- id: mypy
exclude: |
(?x)^(
tests/|
setup.py$
)
types: [python]
args:
- "--disallow-untyped-defs"
- "--pretty"
- "--show-absolute-path"
- "--show-error-context"
- "--show-column-numbers"
- "--show-error-codes"
- "--error-summary"
- "--allow-redefinition"
additional_dependencies:
- "numpy>=1.23.0"
- "torch==1.12.1"
- "torchvision==0.13.1"