-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
80 lines (72 loc) · 1.78 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
repos:
- repo: local
hooks:
- id: black
name: black
language: system
entry: black .
types: [python]
- id: ruff
name: ruff
language: system
entry: ruff
args:
# Tell ruff to fix sorting of imports
- "--fix"
- "--format=github"
- "--target-version=py37"
types: [python]
- id: codespell
name: codespell
language: system
entry: codespell
types: [python]
- id: bandit
name: bandit
language: system
entry: bandit --recursive --skip B101,B324 src # B101 is assert statements
types: [python]
- 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,F401,F541,R501,R502,R503,R504,W503",
"--max-complexity=21", "--max-line-length=162", "--show-source",
"--statistics"]
types: [ python ]
# https://jaredkhan.com/blog/mypy-pre-commit
- id: mypy
name: mypy
entry: mypy
language: python
# use your preferred Python version
# language_version: python3.7
# additional_dependencies: ["mypy==0.790"]
types: [python]
# use require_serial so that script
# is only called once per commit
require_serial: true
# exclude: shape.py|compareshape.py
# Print the number of files as a sanity-check
# verbose: true
# - id: pytest
# name: pytest
# language: system
# entry: pytest
# args:
# # - "--durations=10"
# - "-x"
# pass_filenames: false