-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
55 lines (52 loc) · 1.9 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: venv/|modules/|docker/|pkgs/|migrations/|locust/|common/|swagger/|tests/|settings.py
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
# this does work with jinja templates
# - id: check-yaml
- id: check-added-large-files
- id: forbid-new-submodules
- id: mixed-line-ending
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: ["--line-length", "120"]
- repo: https://github.com/pre-commit/mirrors-isort
rev: "v5.9.1"
hooks:
- id: isort
- repo: https://github.com/pycqa/pylint
rev: "v2.9.3"
hooks:
- id: pylint
args:
- "--max-line-length=120"
- "--enable=all"
- "--disable=C0103,C0114,C0115,C0116,C0206,C0301,C0302,E0401,E501,E1101,E1131,I0011,I0020,I0021,I0023,R0201,R0904,R0914,R0903,R0911,R0912,R0913,R0915,R1702,R1705,R1720,R1725,W605,W0707,W1113,W1203,W0613"
- repo: https://github.com/pycqa/flake8
rev: "3.9.2"
hooks:
- id: flake8
# TODO: DV-839 enable this later
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: "v0.910" # Use the sha / tag you want to point at
# hooks:
# - id: mypy
# args: ["--ignore-missing-imports"]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.0' # Update me!
hooks:
- id: bandit
args:
- "--configfile=.bandit.yaml"
- "--format=custom"
- "--silent"
- "-ll"
- "-ii"
- "--msg-template={relpath}:{line}: [{test_id}] severity:{severity} confidence:{confidence} {msg}"