forked from abhinavsingh/proxy.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
192 lines (182 loc) · 3.76 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
187
188
189
190
191
192
---
repos:
- repo: https://github.com/asottile/add-trailing-comma.git
rev: v2.0.1
hooks:
- id: add-trailing-comma
args:
- --py36-plus
- repo: https://github.com/timothycrosley/isort.git
rev: 5.12.0
hooks:
- id: isort
args:
- --honor-noqa
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
rev: v1.1.7
hooks:
- id: remove-tabs
exclude: |
(?x)
^
helper/proxy\.pac|
Makefile|
proxy/common/pki\.py|
README\.md
$
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.0.1
hooks:
# Side-effects:
- id: trailing-whitespace
exclude: |
(?x)
^
dashboard/src/core/plugins/inspect_traffic\.json
$
- id: check-merge-conflict
- id: double-quote-string-fixer
exclude: |
(?x)
^
(
tests/(
http/exceptions/test_http_proxy_auth_failed|
plugin/test_http_proxy_plugins
)|
proxy/(
common/constants|
plugin/(cache/store/disk|filter_by_url_regex|proxy_pool)
)
)\.py
$
- id: end-of-file-fixer
exclude: |
(?x)
^
dashboard/(
src/core/plugins/inspect_traffic\.json|
static/bootstrap-4\.3\.1\.min\.(cs|j)s
)|
requirements-release\.txt
$
- id: requirements-txt-fixer
exclude: >-
^(docs/requirements|requirements(|-(release|testing|tunnel)))\.txt$
# Non-modifying checks:
- id: name-tests-test
args:
- --django
exclude: >-
^tests/plugin/utils\.py$
files: >-
^tests/[^_].*\.py$
- id: check-added-large-files
- id: check-byte-order-marker
- id: check-case-conflict
# disabled due to pre-commit/pre-commit-hooks#159
# - id: check-docstring-first
- id: check-json
- id: check-symlinks
- id: check-yaml
- id: detect-private-key
# Heavy checks:
- id: check-ast
- id: debug-statements
- repo: https://github.com/PyCQA/pydocstyle.git
rev: 6.1.1
hooks:
- id: pydocstyle
additional_dependencies:
- toml
args:
- |-
--ignore=
D101,
D102,
D103,
D105,
D106,
D107,
D203,
D205,
D208,
D209,
D212,
D213,
D300,
D400,
D401,
D402,
D403,
D404,
D405,
D407,
D412,
D413,
D415,
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
exclude: >
(?x)^(
^.+\.ipynb$|
tests/http/test_responses\.py|
^.+\.min\.js$
)$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.2
hooks:
- id: yamllint
args:
- --strict
types: [file, yaml]
- repo: https://github.com/PyCQA/flake8.git
rev: 3.9.2
hooks:
- id: flake8
language_version: python3
additional_dependencies:
- flake8-2020 >= 1.6.0
- flake8-docstrings >= 1.5.0
- flake8-pytest-style >= 1.2.2
- wemake-python-styleguide >= 0.16.1
- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v0.910
hooks:
- id: mypy
additional_dependencies:
- paramiko == 2.11.0
- types-paramiko == 2.7.3
- types-requests==2.27.30
- cryptography==36.0.2; python_version <= '3.6'
- types-setuptools == 57.4.2
args:
# FIXME: get rid of missing imports ignore
- --ignore-missing-imports
- --install-types
- --namespace-packages
- --non-interactive
- --pretty
- --show-column-numbers
- --show-error-codes
- --show-error-context
- --strict
- --strict-optional
- benchmark/
- examples/
- skeleton/
- proxy/
- tests/
pass_filenames: false
- repo: local
hooks:
- id: pylint
language: system
name: PyLint
files: \.py$
entry: python -m pylint
args: []
stages:
- manual