-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
62 lines (54 loc) · 1.8 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
default_language_version:
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
hooks:
- id: add-trailing-comma
exclude: '(venv|alembic|tests|__pycache__)/.*|__init__.py'
- repo: https://github.com/pycqa/autoflake
rev: v1.7.8
hooks:
- id: autoflake
types: [ python ]
exclude: '(venv|alembic|tests|__pycache__)/.*|__init__.py'
args: [ --remove-all-unused-imports, --recursive, --remove-unused-variables, --in-place ]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
types: [ python ]
exclude: '(venv|alembic|tests|__pycache__)/.*'
args: [ --multi-line=3, --trailing-comma, --force-grid-wrap=0, --use-parentheses, --ensure-newline-before-comments, --line-length=120 ]
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
types: [ python ]
exclude: '(venv|alembic|tests|__pycache__)/.*'
args: [ --line-length=120, --target-version=py38, --skip-string-normalization ]
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
types: [ python ]
exclude: '(venv|alembic|tests|__pycache__)/.*'
args: [
"--max-line-length=120",
"--ignore=D101,W503,C901,E501,E203,ANN002,ANN003,ANN101,ANN102",
"--max-complexity=10",
"--per-file-ignores=__init__.py:F401"
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
types: [ python ]
exclude: '(venv|alembic|tests|__pycache__)/.*'
args: [
"--disable-error-code=import",
]