-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
106 lines (97 loc) · 2.56 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-ast
- id: check-added-large-files
args: [--maxkb=500]
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: pretty-format-json
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/Woile/commitizen
rev: v2.20.5
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/MartinThoma/check-pip-compile
rev: 0.1.1
hooks:
- id: check-pip-compile
args:
[
"requirements/base.in",
"requirements/production.in",
"requirements/development.in",
"requirements/test.in",
]
{% if cookiecutter.use_isort|lower == "y" -%}
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--filter-files"]
{%- endif %}
{% if cookiecutter.use_black|lower == "y" -%}
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
{%- endif %}
{% if cookiecutter.use_flake8|lower == "y" -%}
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-eradicate
- flake8-simplify
{%- endif %}
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py39]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier
{% if cookiecutter.use_mypy|lower == "y" -%}
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
args: [--ignore-missing-imports]
exclude: |
(?x)^(
docs/source/conf.py|
cleanup.py
)$
additional_dependencies:
- types-dataclasses >= 0.1.3
- lxml
{% if cookiecutter.command_line_interface|lower == "click" -%}
- types-click
{%- endif %}
{%- endif %}
{% if cookiecutter.use_bandit|lower == "y" -%}
- repo: https://github.com/PyCQA/bandit
rev: 1.7.2
hooks:
- id: bandit
args:
- -s
- B404,B603,B101
{%- endif %}