forked from meltano/meltano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.flake8
220 lines (216 loc) · 5.72 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
218
219
220
[flake8]
select =
# flake8-bandit
S
# flake-brokenline
N
# flake8-bugbear
B
# flake8-comprehensions
C4
# flake8-debugger
T
# flake8-docstrings
D
# flake8-eradicate
E80
# flake8-rst-docstrings
RST
# flake8-string-format
P
# mccabe
C90
# pep8-naming
N
# pycodestyle
E
W
# pyflakes
F
# wemake-python-styleguide
WPS
# darglint
DAR
ignore =
# flake8-bandit
# Allow subprocess module to be used
S404
# pycodestyle
# Allow for line breaks where Black decides are valid
W503
# Allow for long lines since we delegate to Black for enforcement
E501
# wemake-python-styleguide
# Allow blacklisted variable names that can be clear enough in method context
WPS110
# Allow upper-case constants in Enum subclasses
WPS115
# Allow "too many"
WPS211
# Allow local folder imports (import .module)
WPS300
# Allow f-strings
WPS305
# Ignore missing base class, required by pyupgrade: https://github.com/asottile/pyupgrade#rewrites-class-declaration
WPS306
# Allow assignment expressions (walrus operator :=)
WPS332
# Allow 'incorrect' order of methods in a class
WPS338
# Allow `.` at beginning of line to accommodate Black formatting of multiline chained function calls
WPS348
# Allow `pass` keywords in `except` bodies to prevent falling through to another `except`
WPS420
# Allow nested classes
WPS431
# Allow subclassing a builtin, such as 'str' (used for serializable Enums)
WPS600
# Allow using @staticmethod
WPS602
# Ignore 'too many return statements' - noqa parse inconsistent between py38 vs prior
WPS212
# Various WPS refactor heavy warnings to ignore that currently have a poor risk/reward tradeoff.
WPS100
WPS112
WPS201
WPS220
WPS221
WPS226
WPS229
WPS231
WPS232
WPS237
WPS316
WPS337
WPS352
WPS404
WPS407
WPS412
WPS429
WPS430
WPS433
WPS454
WPS501
exclude =
.venv
venv
*.md
src/webapp/node_modules/
inline_quotes = double
max_line_length = 88
show_source = true
extended_default_ignore = []
max_imports = 20
docstring_style = google
per_file_ignores =
tests/*:
# Don't warn on use of asserts in tests
S101
# Don't require docstrings in tests
DAR101
D100
D101
D102
D103
# Don't warn on overused expressions in test methods
WPS204
# Don't warn on too many arguments in test methods
WPS211
# Don't warn on too many `assert` statements in test methods
WPS218
# Found too many expressions
WPS213
# Don't warn on too many methods in test modules
WPS214
# Don't warn on too many string constants in test methods
WPS226
# Context manager with too many assignments
WPS316
# Allow outer scope name shadowing for fixtures
WPS442
# Allow nested functions in test methods
WPS430
# Allow protected attribute usage in test methods
WPS437
# Found block variables overlap (false positive)
WPS440
# Found module with too many imports
WPS201
# Found too many module members
WPS202
# Found boolean non-keyword argument
WPS425
!tests/*:
T
scripts/*:
# Allow for print function calls
WPS421
src/meltano/cli/*:
# Allow backslashes in dosctrings
D301
# Don't require docstrings in click commands
DAR
# Allow ending block quote without a blank line
RST201
# Allow many local variables, since these aid in string building
WPS210
# Allow many arguments, since these often represent CLI arguments
WPS211
# Allow many expressions, since string building requires them
WPS213
# Allow many decorators, since `click` uses them to define the CLI
WPS216
# Allow many module members
WPS202
src/meltano/migrations/versions/*:
# Don't class docstrings in migrations
D101
# Don't require function docstrings in migrations
D103
# Don't require periods in the first lines of dosctrings
D400
# Allow uppercase variable names
N806
# Allow module names starting with numbers
WPS102
# Allow long filenames
WPS118
# Allow expression "overuse"
WPS204
# Allow string constant "overuse"
WPS226
# Allow "magic" numbers
WPS432
src/meltano/core/job/job.py:
# Class attributes can be used as instance attributes in sqlalchemy.declarative model
WPS601
src/meltano/core/project_files.py:
# Dict manipulation requires lots of string constant references
WPS226
src/meltano/core/project_init_service.py:
# Found string constant over-use: blue > 3
WPS226
# Found too long ``try`` body length: 3 > 1
WPS229
# Found too many expressions: 27 > 9
WPS213
**/__init__.py:
# Allow for using __init__.py to promote imports to the module namespace
F401
src/meltano/__init__.py:
# Found `__init__.py` module with logic
WPS412
# Found wrong metadata variable
WPS410
src/meltano/core/block/extract_load.py:
# Found module with too many imports: 21 > 20
WPS201
src/meltano/core/logging/utils.py:
# Found wrong module name
WPS100
src/meltano/core/cli_messages.py:
# Special exceptions for cli magic
WPS114
WPS360
W291
W293