-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathpre-commit-config.yaml
66 lines (61 loc) · 1.58 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
exclude: '^$|settings|scripts|vendor|\.(min\.js|svg)$|static/.*\.js$'
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# Disabled because yapf is better for our purpose
# - id: autopep8-wrapper
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-vcs-permalinks
- id: debug-statements
- id: fix-byte-order-marker
- id: end-of-file-fixer
- id: fix-encoding-pragma
exclude: |
(?x)^(
readthedocs/rtd_tests/files/conf.py|
)$
args: ['--remove']
- id: check-merge-conflict
- id: check-symlinks
- id: trailing-whitespace
exclude: |
(?x)^(
docs/.+/locale/.*\.po|
.+\.svg|
.+\.js|
.+\.css|
.*/migrations/.*|
)$
- id: mixed-line-ending
args: ['--fix=lf']
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.14.1"
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7.0]
- repo: https://github.com/aspiredu/django-safemigrate
rev: "4.2"
hooks:
- id: check
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.9.9
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format