-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
68 lines (67 loc) · 1.93 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
68 lines (67 loc) · 1.93 KB
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
default_language_version:
python: python3.10
default_stages: [commit]
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.23.1
hooks:
- id: pyupgrade
language_version: python3.10
args:
- --py3-plus
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.0.0
hooks:
- id: trailing-whitespace
exclude: 'examples.sql'
- id: end-of-file-fixer
exclude: ^(.bumpversion.cfg|examples.sql)
- id: check-docstring-first
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: name-tests-test
exclude: ^(backend/tests/fixtures|backend/tests/factories.py)
args:
- --django
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21 # Use the revision sha / tag you want to point at
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3.10
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
language_version: python3.10
args:
- --append-config=backend/.flake8
additional_dependencies:
- 'flake8-future-import==0.4.6'
- 'flake8-formatter-abspath==1.0.1'
- 'flake8-mock==0.3'
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.3
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.6.0
hooks:
- id: pylint
language_version: python3.10
args:
- --rcfile=backend/pylintrc
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.800'
hooks:
- id: mypy
language_version: python3.10
entry: bash -c 'cd backend && make lint-mypy'
additional_dependencies:
- 'mypy-extensions==0.4.3'
- 'sqlalchemy-stubs==0.4'
- 'typing-extensions==3.7.4.3'