This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.pre-commit-config.yaml
64 lines (64 loc) · 2.07 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: |
(?x)(
^backend/static/|
^backend/backups/|
^backend/run/|
^database/backups/|
^database/data/
)
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: ^backend/static/
# Note that this does not mix with git setup check-in LF check-out CRLF,
# see https://github.com/pre-commit/pre-commit-hooks#mixed-line-ending
- id: mixed-line-ending
args: [--fix=lf]
exclude: |
(?x)(
^backend/static/|
^backend/backups/|
^backend/run/|
^database/backups/|
^database/data/
)
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort
# args: [--filter-files]
# use black or autopep8 to automatically format files to pep8
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
args: [--line-length=100]
language_version: python3
exclude: |
(?x)(
^backend/apps/[a-z]*/migrations/[0-9A-z]*.py|
^backend/backups/|
^backend/run/|
^database/backups/|
^database/data/
)
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
additional_dependencies: [flake8-import-order,flake8-builtins,flake8-docstrings,flake8-logging-format,flake8-todos]
exclude: |
(?x)(
^backend/apps/[a-z]*/migrations/[0-9A-z]*.py|
^backend/backups/|
^backend/run/|
^database/backups/|
^database/data/
)