-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
56 lines (49 loc) · 1.27 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
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
# turn off assert errors for tests
exclude: ^tests/
args:
- -s
- B101
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: [ "--profile", "black", "--filter-files" ]
- repo: local
hooks:
# use local mypy instead of pre-commit hook, since this way we run in venv
# and have all dependencies
- id: mypy
name: mypy
entry: poetry run mypy --package ivhd --package tests
language: system
pass_filenames: false
- repo: local
hooks:
- id: poetry-plugin-sort
name: poetry-plugin-sort
entry: poetry sort
language: system
pass_filenames: false
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [ "--py39-plus" ]
- repo: https://github.com/yunojuno/pre-commit-xenon
rev: v0.1
hooks:
- id: xenon
args: [ "--max-average=B", "--max-modules=B", "--max-absolute=C" ]