-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.flake8
217 lines (197 loc) · 7.32 KB
/
.flake8
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
[flake8]
#
# flake8 config file docs: https://flake8.pycqa.org/en/latest/user/configuration.html
#
# in venv
# pip install wemake-python-styleguide
# flake8 transtool/ tests/
#
# Refactoring hints:
# https://flake8.codes/wemake-python-styleguide/0.15.3/index.html
# https://pypi.org/project/flake8-noqa/
##noqa-require-code
max-line-length = 132
exclude =
.git,
__pycache__,
# This contains our built documentation
build,
dist
# it's not a bug that we aren't using all of hacking
ignore =
# D101 Missing docstring in public class
D101,
# D102 Missing docstring in public method
D102,
# D107 Missing docstring in __init_
D107,
# D200 One-line docstring should fit on one line with quotes
D200,
# D202 No blank lines allowed after function docstring
D202,
# D205 1 blank line required between summary line and description
D205,
# D400 First line should end with a period
D400,
# D401 First line should be in imperative mood
D401,
# DAR101 Missing parameter(s) in Docstring
DAR101,
# DAR201 Missing "Returns" in Docstring: - return
DAR201,
# DAR401 Missing exception(s) in Raises section: -r TypeError
DAR401,
# E241 multiple spaces after ':'
E241,
# E251 unexpected spaces around keyword / parameter equals
E251,
# F821 undefined name 'PropFile'
F821,
# I001 isort found an import in the wrong position
I001,
# I003 isort expected 1 blank line in imports,
I003,
# I004 isort found an unexpected blank line in imports
I004,
# I005 isort found an unexpected missing import
I005,
# RST213 Inline emphasis start-string without end-string.
RST213,
# W503 line break before binary operator
W503,
# WPS110 Found wrong variable name: item
WPS110,
# WPS114 Found underscored number name pattern: val_1
WPS114,
# WPS115 Found upper-case constant in a class
WPS115,
# WPS201 Found module with too many imports: 13 > 12
WPS201,
# WPS204 Found overused expression: config['opening']; used 5 > 4
WPS204,
# WPS210 Found too many local variables: 14 > 5
WPS210,
# WPS211 Found too many arguments: 6 > 5
WPS211,
# WPS213 Found too many expressions: 10 > 9
WPS213,
# WPS214 Found too many methods: 9 > 7
WPS214,
# WPS220 Found too deep nesting: 28 > 20
WPS220,
# WPS221 Found line with high Jones Complexity: 17 > 14
WPS221,
# WPS226 Found string constant over-use: " > 3
WPS226,
# WPS229 Found too long ``try`` body length: 2 > 1
WPS229,
# WPS231 Found function with too much cognitive complexity: 83 > 12
WPS231,
# WPS232 Found module cognitive complexity that is too high: 27.7 > 8
WPS232,
# WPS237 Found a too complex `f` string
WPS237,
# WPS238 Found too many raises in a function: 5 > 3
WPS238,
# WPS300 Found local folder import
WPS300,
# WPS302 Found unicode string prefix
WPS302,
# WPS305 Found `f` string
WPS305,
# WPS317 Found incorrect multi-line parameters
WPS317,
# WPS318 Found extra indentation
WPS318,
# WPS319 Found bracket in wrong position
WPS319,
# WPS336 Found explicit string concatenation
WPS336,
# WPS338 Found incorrect order of methods in a class
WPS338,
# WPS360 Found an unnecessary use of a raw string
WPS360,
# WPS402 Found `noqa` comments overuse: 12
WPS402,
# WPS420 Found wrong keyword: pass
WPS420,
# WPS442 Found outer scope names shadowing:
WPS442,
# WPS600 Found subclassing a builtin: list
WPS600,
# WPS602 Found using `@staticmethod`
WPS602,
# WPS604 Found incorrect node inside `class` body
WPS604,
# WPS605 Found method without arguments
WPS605,
# WPS615 Found unpythonic getter or setter
WPS615,
# WPS234 Found overly complex annotation: 4 > 3
WPS234,
per-file-ignores =
# WPS420 Found wrong keyword: pass
# WPS604 Found incorrect node inside `class` body
transtool/report/error.py: WPS420, WPS604,
transtool/report/warn.py: WPS420, WPS604,
# WPS437 Found protected attribute usage
transtool/report/group.py: WPS437,
# WPS230 Found too many public instance attributes
transtool/config/config.py: WPS230,
# WPS204 Found overused expression: config['opening']; used 5 > 4
# WPS213 Found too many expressions
# WPS301 Found dotted raw import: transtool.checks
# WPS421 Found wrong function call: dir, print
# WPS437 Found protected attribute usage
# WPS529 Found implicit `.get()` dict usage
# WPS609 Found direct magic attribute usage: __setattr__, __getattr__, ...
# WPS433 Found nested import
# WPS425 Found boolean non-keyword argument: True, False
transtool/config/reader.py: WPS609, WPS421, WPS204, WPS529, WPS433,
transtool/config/builder.py: WPS609, WPS301, WPS437, WPS213, WPS425,
# WPS111 Found too short name
# WPS214 Found too many methods
# WPS317 Found incorrect multi-line parameters
# WPS323 Found `%` string formatting
# WPS421 Found wrong function call: print
# WPS437 Found protected attribute usage
# WPS518 Found implicit `enumerate()` call
# transtool/log.py: WPS214, WPS437, WPS111, WPS317, WPS421, WPS518, WPS323,
# WPS201 Found module with too many imports: 13 > 12
# WPS213 Found too many expressions: 13 > 9
# WPS317 Found incorrect multi-line parameters
# WPS323 Found `%` string formatting
transtool/main.py: WPS201, WPS213, WPS317, WPS323,
# S101 Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
# WPS421 Found wrong function call: dir
# WPS430 Found nested function: overrider
transtool/decorators/overrides.py: WPS430, S101, WPS421,
# WPS201 Found module with too many imports: 21 > 12
# WPS230 Found too many public instance attributes
# WPS473 Found too many empty lines in `def`: 7 > 6
transtool/prop/file.py: WPS201, WPS230, WPS473,
# WPS100 Found wrong module name
# WPS421 Found wrong function call: print
transtool/utils.py: WPS421, WPS100,
# S311 Standard pseudo-random generators are not suitable for security/cryptographic purposes.
# WPS118 Found too long name
# WPS214 Found too many methods
# WPS323 Found `%` string formatting
# WPS432 Found magic number
# WPS437 Found protected attribute usage
# WPS609 Found direct magic attribute usage: __abstractmethods__
tests/*: S311, WPS323, WPS214, WPS432, WPS609, WPS118, WPS437,
# WPS431 Found nested class: FakeArgs
tests/report/test_config_builder.py: WPS431,
# WPS430 Found nested function: log_abort_side_effect
# S311 Standard pseudo-random generators are not suitable for security/cryptographic purposes.
# N802 function name 'assertTranslation' should be lowercase
tests/prop/test_file.py: WPS430, S311, N802
# WPS230 Found too many public instance attributes: 8 > 6
# WPS414 Found incorrect unpacking target
# WPS425 Found boolean non-keyword argument: True, False
# WPS431 Found nested class: FakeArgs
# WPS437 Found protected attribute usage: _validate
# WPS609 Found direct magic attribute usage: __setattr__
# S311 Standard pseudo-random generators are not suitable for security/cryptographic purposes.
tests/config/test_config_builder.py: WPS437, WPS425, WPS431, WPS230, WPS414, WPS609, S311,