1
1
# See https://pre-commit.com for more information
2
2
# See https://pre-commit.com/hooks.html for more hooks
3
+ ci :
4
+ skip : ['yesqa', 'no-commit-to-branch']
3
5
repos :
6
+ - repo : https://github.com/pre-commit-ci/pre-commit-ci-config
7
+ rev : v1.5.1
8
+ hooks :
9
+ - id : check-pre-commit-ci-config
10
+ - repo : https://github.com/charliermarsh/ruff-pre-commit
11
+ rev : v0.0.276
12
+ hooks :
13
+ - id : ruff
14
+ args : ['--fix', '--exit-non-zero-on-fix']
15
+ # Extra args, only after removing flake8 and yesqa: '--extend-select', 'RUF100'
4
16
- repo : https://github.com/lucasmbrown/mirrors-autoflake
5
17
rev : v1.3
6
18
hooks :
@@ -13,66 +25,123 @@ repos:
13
25
' --remove-unused-variables' ,
14
26
' --remove-duplicate-keys' ,
15
27
]
28
+ - repo : https://github.com/asottile/pyupgrade
29
+ rev : v3.8.0
30
+ hooks :
31
+ - id : pyupgrade
32
+ args :
33
+ ['--keep-runtime-typing', '--py3-plus', '--py36-plus', '--py37-plus']
34
+ - repo : https://github.com/asottile/yesqa
35
+ rev : v1.5.0
36
+ hooks :
37
+ - id : yesqa
38
+ additional_dependencies : &flake8deps
39
+ - bandit
40
+ - flake8-assertive
41
+ - flake8-blind-except
42
+ - flake8-builtins
43
+ - flake8-comprehensions
44
+ - flake8-isort
45
+ - flake8-logging-format
46
+ - flake8-mutable
47
+ - flake8-print
48
+ - pep8-naming
49
+ - toml
50
+ - tomli
16
51
- repo : https://github.com/PyCQA/isort
17
52
rev : 5.12.0
18
53
hooks :
19
54
- id : isort
20
55
additional_dependencies :
21
- - toml
56
+ - tomli
22
57
- repo : https://github.com/psf/black
23
58
rev : 23.3.0
24
59
hooks :
25
60
- id : black
61
+ - repo : https://github.com/pre-commit/mirrors-mypy
62
+ rev : v1.4.1
63
+ hooks :
64
+ - id : mypy
65
+ # warn-unused-ignores is unsafe with pre-commit, see
66
+ # https://github.com/python/mypy/issues/2960
67
+ args : ['--no-warn-unused-ignores', '--ignore-missing-imports']
68
+ additional_dependencies :
69
+ - alembic
70
+ - flask
71
+ - lxml-stubs
72
+ - sqlalchemy
73
+ - toml
74
+ - tomli
75
+ - types-geoip2
76
+ - types-python-dateutil
77
+ - types-pytz
78
+ - types-requests
79
+ - typing-extensions
80
+ - repo : https://github.com/PyCQA/flake8
81
+ rev : 6.0.0
82
+ hooks :
83
+ - id : flake8
84
+ additional_dependencies : *flake8deps
85
+ - repo : https://github.com/PyCQA/pylint
86
+ rev : v3.0.0a6
87
+ hooks :
88
+ - id : pylint
89
+ args : [
90
+ ' --disable=import-error' ,
91
+ ' -rn' , # Disable full report
92
+ ' -sn' , # Disable evaluation score
93
+ ' --ignore-paths=migrations' ,
94
+ ]
95
+ additional_dependencies :
96
+ - tomli
97
+ - repo : https://github.com/PyCQA/bandit
98
+ rev : 1.7.5
99
+ hooks :
100
+ - id : bandit
101
+ language_version : python3
102
+ args : ['-c', 'pyproject.toml']
103
+ additional_dependencies :
104
+ - ' bandit[toml]'
26
105
- repo : https://github.com/pre-commit/pre-commit-hooks
27
106
rev : v4.4.0
28
107
hooks :
29
108
- id : check-added-large-files
30
109
- id : check-ast
31
- - id : check-byte-order-marker
32
110
- id : check-case-conflict
33
111
- id : check-docstring-first
34
112
- id : check-executables-have-shebangs
35
113
- id : check-json
36
114
- id : check-merge-conflict
115
+ - id : check-shebang-scripts-are-executable
37
116
- id : check-symlinks
38
117
- id : check-toml
118
+ - id : check-vcs-permalinks
39
119
- id : check-xml
40
120
- id : check-yaml
41
121
- id : debug-statements
122
+ - id : destroyed-symlinks
42
123
- id : detect-aws-credentials
43
124
args : ['--allow-missing-credentials']
44
125
- id : detect-private-key
45
126
- id : end-of-file-fixer
127
+ - id : fix-byte-order-marker
46
128
- id : fix-encoding-pragma
47
129
args : ['--remove']
48
130
- id : forbid-new-submodules
49
131
- id : mixed-line-ending
132
+ - id : name-tests-test
133
+ args : ['--pytest']
50
134
- id : no-commit-to-branch
51
135
- id : requirements-txt-fixer
52
136
- id : trailing-whitespace
53
- - repo : https://github.com/PyCQA/flake8
54
- rev : 6.0.0
55
- hooks :
56
- - id : flake8
57
- additional_dependencies :
58
- - toml
59
- - flake8-assertive
60
- - flake8-blind-except
61
- - flake8-builtins
62
- - flake8-comprehensions
63
- - flake8-isort
64
- - flake8-logging-format
65
- - flake8-mutable
66
- - flake8-print
67
- - pep8-naming
68
- - repo : https://github.com/PyCQA/bandit
69
- rev : 1.7.5
70
- hooks :
71
- - id : bandit
72
- language_version : python3
73
- exclude : (^tests|funnel/loginproviders/flask_oauth.py)
137
+ args : ['--markdown-linebreak-ext=md']
74
138
- repo : https://github.com/pre-commit/mirrors-prettier
75
139
rev : v3.0.0-alpha.9-for-vscode
76
140
hooks :
77
141
- id : prettier
78
142
args : ['--single-quote', '--trailing-comma', 'es5']
143
+ - repo : https://github.com/ducminh-phan/reformat-gherkin
144
+ rev : v3.0.1
145
+ hooks :
146
+ - id : reformat-gherkin
147
+ files : \.feature$
0 commit comments