-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
93 lines (85 loc) · 2.44 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit]
fail_fast: false
repos:
- repo: https://github.com/psf/black
rev: "22.10.0"
hooks:
- id: black
name: Format code (black)
entry: black
language: system
types: [python]
# stages: [push]
- repo: https://github.com/pycqa/autoflake
rev: "v1.7.7"
hooks:
- id: autoflake
name: Remove unused imports (autoflake)
args:
[
--in-place,
--remove-all-unused-imports,
--remove-duplicate-keys,
"--remove-unused-variables",
"--expand-star-imports",
"--ignore-init-module-imports",
]
# stages: [push]
- repo: https://github.com/pycqa/isort
rev: "5.10.1"
hooks:
- id: isort
name: Sort imports (isort)
# stages: [push]
- repo: https://github.com/pycqa/flake8
rev: "5.0.4"
hooks:
- id: flake8
name: Check code style and quality (flake8)
# stages: [push]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.982"
hooks:
- id: mypy
name: Static type validation (mypy)
exclude: build_helpers
additional_dependencies:
- types-cachetools==5.2.1
- types-filelock==3.2.7
- types-requests==2.28.10
- types-tabulate==0.8.11
- types-python-dateutil==2.8.19
- types-dateparser==1.1.4
# stages: [push]
- repo: https://github.com/asottile/yesqa
rev: "v1.4.0"
hooks:
- id: yesqa
name: Remove usless "# noqa" comments (yesqa)
# stages: [push]
- repo: https://github.com/pycqa/bandit
rev: "1.7.4"
hooks:
- id: bandit
name: Code security analysis (bandit)
args: ["-c", "pyproject.toml", "-r", "fff", "--severity=medium"]
pass_filenames: false
additional_dependencies: ["bandit[toml]"]
# stages: [push]
- repo: https://github.com/dhatim/python-license-check
rev: "0.7.2"
hooks:
- id: liccheck
name: Verification of package license issues (liccheck)
args: ["-r", "requirements.txt"]
language: system
# stages: [push]
- repo: local
hooks:
- id: bumpver
name: Bump project version
language: system
stages: [push]
entry: python3 build_helpers/bump_version.py