-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
53 lines (47 loc) · 1.59 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
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.13.2
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=py310 ]
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
types: [ python ]
additional_dependencies:
- flake8-annotations
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"
]