-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
51 lines (51 loc) · 1.49 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
exclude: '(\.git|\.mypy_cache|\.pytest_cache|\.tox|\.venv|venv|.env|env|\.vscode|static|media/|.*/templates|.*/migrations)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-byte-order-marker
- repo: https://github.com/ambv/black
rev: 22.6.0
hooks:
- id: black
args: [ '--line-length=120' ]
#- repo: https://github.com/asottile/reorder_python_imports
# rev: v3.8.2
# hooks:
# - id: reorder-python-imports
- repo: https://github.com/pycqa/flake8
rev: '3.9.2'
hooks:
- id: flake8
args: [ '--max-line-length=120' ]
language_version: python3
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
name: Run type checks
args: [ "--ignore-missing-imports", "--install-types", "--non-interactive" ]
- repo: local
hooks:
- id: migrations-check
language: system
name: Check for uncreated migrations.
entry: bash -c "./manage.py makemigrations --check --dry-run"
types: [ "python" ]
pass_filenames: false
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: local
hooks:
- id: django-test
name: django-test
entry: python manage.py test
always_run: true
pass_filenames: false
language: system