-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
53 lines (53 loc) · 1.47 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
repos:
- repo: local
hooks:
- id: requirements
name: requirements
entry: bash -c "pipenv requirements > Requirements.txt && git add Requirements.txt"
language: system
files: "(Pipfile*|Requirements.txt)"
pass_filenames: false
- id: isort
name: sort python imports
entry: isort --settings-path setup.cfg
language: system
files: '.*\.py'
pass_filenames: true
- id: black
name: black (format)
entry: black
args: ["--line-length", "90"]
language: system
files: '.*\.py'
pass_filenames: true
- id: pyroma
name: check setup.py
entry: pyroma .
language: system
files: "setup.py"
pass_filenames: true
- id: unittest
name: run unittests
entry: pytest -v
language: system
files: '.*\.py'
pass_filenames: false
- id: pylint
name: lint python code (pylint)
entry: pylint --rcfile=setup.cfg
language: system
files: '.*\.py'
pass_filenames: true
- id: mypy
name: Check typing
entry: mypy
args: ["--ignore-missing-imports", "--strict", "--show-error-codes"]
language: system
files: ".*.py"
pass_filenames: true
- id: bandit
name: check python security (bandit)
entry: bandit
language: system
files: '.*\.py'
pass_filenames: true