-
-
Notifications
You must be signed in to change notification settings - Fork 156
/
.pre-commit-config.yaml
68 lines (68 loc) · 2.19 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
repos:
- repo: https://github.com/psf/black
rev: 24.3.0
entry: black --check --diff
hooks:
- id: black
name: Black Formatter
files: .
language: python
types: [ python ]
- repo: local
hooks:
- id: pre-commit-django-migrations
name: Check django migrations
entry: python manage.py makemigrations --dry-run --check --no-input
language: system
types: [ python ]
files: ./backend/models.py
pass_filenames: false
- repo: local
hooks:
- id: pre-commit-djlint
name: Djlint (html files)
entry: djlint ./frontend/templates/ --profile django --reformat
language: system
files: ./frontend/templates/
types: [ html ]
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
types: [ text ]
language: python
- id: end-of-file-fixer
types: [ python ]
language: python
- id: detect-aws-credentials
- id: detect-private-key
exclude: "docs/getting-started/settings/AWS/static.md"
- id: check-added-large-files
- id: check-ast
types: [ python3 ]
language: python
files: ".*\\.py$" # may not be needed due to type of python3
- id: check-json
types: [ json ]
files: ".*\\.json$"
exclude: "backend/management/commands/contributors.json"
# - id: debug-statements # (unknown use)
# - id: name-tests-test # (blocking)
# - repo: https://github.com/asottile/setup-cfg-fmt
# rev: v2.5.0
# hooks:
# - id: setup-cfg-fmt
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.15.2
# hooks:
# - id: pyupgrade # (blocking)
# args: [ --py39-plus ]
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.7.0
# hooks:
# - id: mypy # (blocking)
# args:
# - --explicit-package-bases
# - --no-incremental
# additional_dependencies: ['mypy >=1.7.0, <1.8.0']