forked from hasgeek/funnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
186 lines (186 loc) · 5.47 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit]
# Enable this to enforce a common Python version:
# default_language_version:
# python: python3.9
ci:
skip: ['pip-compile', 'yesqa', 'no-commit-to-branch']
repos:
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.5.1
hooks:
- id: check-pre-commit-ci-config
- repo: https://github.com/jazzband/pip-tools
rev: 6.12.2
hooks:
- id: pip-compile
name: pip-compile requirements.in
args:
[
'--output-file=requirements.txt',
'--resolver=backtracking',
'requirements.in',
]
files: ^requirements\.(in|txt)$
- id: pip-compile
name: pip-compile requirements_test.in
args:
[
'--output-file=requirements_test.txt',
'--resolver=backtracking',
'requirements.in',
'requirements_test.in',
]
files: ^requirements(_test)?\.(in|txt)$
- id: pip-compile
name: pip-compile requirements_dev.in
args:
[
'--output-file=requirements_dev.txt',
'--resolver=backtracking',
'requirements.in',
'requirements_test.in',
'requirements_dev.in',
]
files: ^requirements(_test|_dev)?\.(in|txt)$
- repo: https://github.com/lucasmbrown/mirrors-autoflake
rev: v1.3
hooks:
- id: autoflake
args:
[
'--in-place',
'--remove-all-unused-imports',
'--ignore-init-module-imports',
'--remove-unused-variables',
'--remove-duplicate-keys',
]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args:
['--keep-runtime-typing', '--py3-plus', '--py36-plus', '--py37-plus']
- repo: https://github.com/asottile/yesqa
rev: v1.4.0
hooks:
- id: yesqa
additional_dependencies: &flake8deps
- bandit
- flake8-assertive
- flake8-blind-except
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
- flake8-docstrings
- flake8-isort
- flake8-logging-format
- flake8-mutable
- flake8-plugin-utils
- flake8-print
- flake8-pytest-style
- pep8-naming
- toml
- tomli
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
additional_dependencies:
- tomli
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
# Mypy is temporarily disabled until the SQLAlchemy 2.0 migration is complete
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.991
# hooks:
# - id: mypy
# # warn-unused-ignores is unsafe with pre-commit, see
# # https://github.com/python/mypy/issues/2960
# args: ['--no-warn-unused-ignores', '--ignore-missing-imports']
# additional_dependencies:
# - lxml-stubs
# - sqlalchemy
# - toml
# - tomli
# - types-all
# - typing-extensions
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: *flake8deps
- repo: https://github.com/PyCQA/pylint
rev: v2.16.1
hooks:
- id: pylint
args: [
'--disable=import-error',
'-rn', # Disable full report
'-sn', # Disable evaluation score
'--ignore-paths=tests,migrations',
]
additional_dependencies:
- pylint-pytest
- tomli
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
language_version: python3
args: ['-c', 'pyproject.toml']
additional_dependencies:
- toml
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: ['--remove']
- id: forbid-new-submodules
- id: mixed-line-ending
- id: no-commit-to-branch
- id: requirements-txt-fixer
files: requirements(_.*)?\.in
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
args: ['--single-quote', '--trailing-comma', 'es5']
exclude: funnel/templates/js/
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.19.14
hooks:
- id: djlint-jinja
files: \.html\.(jinja2|j2)$
- id: djlint-handlebars
files: \.html\.(mustache|hb)$
- repo: https://github.com/ducminh-phan/reformat-gherkin
rev: v3.0.1
hooks:
- id: reformat-gherkin
files: \.feature$