forked from dpriskorn/ItemSubjector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
63 lines (54 loc) · 1.42 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
repos:
- repo: local
hooks:
- id: black
name: black
language: system
entry: black .
pass_filenames: false
#types: [python]
- id: codespell
name: codespell
language: system
entry: codespell
types: [python]
- id: bandit
name: bandit
language: system
entry: bandit --recursive --skip B301,B105,B403,B311,B101,B324 src # B101 is assert statements
# types: [python]
pass_filenames: false
- id: isort
name: isort
language: system
entry: isort
args: ["--profile", "black", "--filter-files"]
types: [python]
- id: pyupgrade
name: pyupgrade
language: system
entry: pyupgrade
args: ["--keep-runtime-typing", "--py37-plus"]
types: [python]
# https://flake8.pycqa.org/en/latest/user/using-hooks.html
- id: flake8
name: flake8
language: system
entry: flake8
args: ["--ignore=C408,C416,E203,F401,F541,R501,R502,R503,R504,W503",
"--max-complexity=21", "--max-line-length=162", "--show-source",
"--statistics"]
types: [ python ]
- id: safety
name: safety
language: system
entry: safety
args: ["check"]
pass_filenames: false
- id: pytest
name: pytest
language: system
entry: pytest
args: ["--durations=10", "--exitfirst"]
# see https://stackoverflow.com/questions/64011304/running-pytest-as-a-pre-commit-hook-no-such-file-or-directory-issue
pass_filenames: false