forked from avelino/django-wysiwyg-redactor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
88 lines (88 loc) · 2.22 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
default_language_version:
python: python3
fail_fast: true
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.7.0
hooks:
- id: pyupgrade
stages: [commit]
name: "✅ Python Upgrade"
args:
- "--py36-plus"
- "--py37-plus"
- "--py38-plus"
- "--py39-plus"
- "--py310-plus"
- "--py311-plus"
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.14.0 # replace with latest tag on GitHub
hooks:
- id: django-upgrade
stages: [commit]
name: "✅ Django Upgrade"
args: [--target-version, "4.2"]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
stages: [commit]
name: "✅ Black Reformatting"
exclude: ^.*\b(migrations)\b.*$
- repo: https://github.com/PyCQA/autoflake
rev: v1.4
hooks:
- id: autoflake
stages: [commit]
name: "✅ Autoflake Reformatting"
language: python
'types': [python]
require_serial: true
exclude: |
(?x)(
.*?/migrations/.*
)
entry: autoflake
args:
- "--ignore-init-module-imports"
- "--remove-all-unused-imports"
- "--in-place"
- "--remove-unused-variables"
- repo: https://github.com/PyCQA/flake8
rev: 3.8.0
hooks:
- id: flake8
stages: [commit]
name: "✅ Flake8 Validation"
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
stages: [commit]
name: "✅ Isort Validation"
- repo: local
hooks:
- id: mypy
stages: [commit]
name: "✅ Mypy Validation"
entry: mypy
language: python
types: [python]
args: ["--install-types", "--non-interactive", "--python-version=3.11"]
additional_dependencies: [
"mypy~=0.931"
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1 # Use the ref you want to point at
hooks:
- id: check-merge-conflict
name: "✅ Checking Merge Conflict"
- repo: local
hooks:
- id: django-test
name: "🪲 Django Testing"
entry: python runtests.py
always_run: true
verbose: true
pass_filenames: false
language: system