-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
99 lines (91 loc) · 2.02 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
94
95
96
97
98
99
default_language_version:
python: python3.10
repos:
- repo: https://github.com/asottile/pyupgrade
rev: "v2.38.2"
hooks:
- id: pyupgrade
args: ["--py310-plus"]
- repo: https://github.com/hadialqattan/pycln
rev: "v2.1.1"
hooks:
- id: pycln
args:
- --config=backend/pyproject.toml
- --all
- repo: https://github.com/pycqa/isort
rev: '5.10.1'
hooks:
- id: isort
args:
- --profile=black
files: ^backend/
- repo: https://github.com/psf/black
rev: '22.8.0'
hooks:
- id: black
args:
- --skip-string-normalization
files: ^backend/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.3.0'
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-yaml
- id: debug-statements
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: '5.0.4'
hooks:
- id: flake8
name: flake 8 (src)
args:
- --max-line-length=88
# D106 Missing docstring in public nested class
# D401 First line should be in imperative mood
- --extend-ignore=D106,D401
- --extend-ignore=D
- --extend-immutable-calls=Body,Depends,Field,Path,Query
additional_dependencies:
- flake8-bugbear
- flake8-docstrings
files: ^backend/sonouno_server/
- repo: https://github.com/pycqa/flake8
rev: '5.0.4'
hooks:
- id: flake8
name: flake 8 (tests)
args:
# E501 Line too long
- --extend-ignore=D, E501
files: ^backend/tests/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.981'
hooks:
- id: mypy
additional_dependencies:
- toml
- apischema
- asgi_lifespan
- bcrypt
- beanie
- decouple
- fastapi
- fastapi_mail
- fastapi_jwt_auth
- networkx
- numpy
- pytest-stub
- scipy
- sonounolib
- streamunolib
- types-Pillow
args:
# - --strict
- --config-file=backend/pyproject.toml
- --show-error-code
- --enable-error-code=ignore-without-code
files: ^backend/