-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
59 lines (55 loc) · 1.79 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
exclude: (settings.py$|wsgi.py$|__init__.py$)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
# Enable if single quote strings are needed
# - id: double-quote-string-fixer
- repo: https://github.com/asottile/pyupgrade
rev: v1.12.0
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.4.0
hooks:
- id: reorder-python-imports
language_version: python3
- repo: https://github.com/asottile/add-trailing-comma
rev: v1.0.0
hooks:
- id: add-trailing-comma
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
# This hook will be enabled later
# - repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
# rev: v1.0.3
# hooks:
# - id: python-bandit-vulnerability-check
# args: [-l, --recursive, -x, tests]
# files: .py$
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.6
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
hooks:
- id: flake8
args: ["--max-line-length=88", "--ignore=D400,E231"]
# More plugins: https://github.com/DmytroLitvinov/awesome-flake8-extensions
additional_dependencies:
[
flake8-tidy-imports,
flake8-docstrings,
flake8-django,
flake8-bugbear,
]