-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.flake8
173 lines (155 loc) · 4.59 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
[flake8]
# Print the total number of errors:
count = true
# Don't even try to analyze these:
extend-exclude =
# Circle CI configs
.circleci,
# No need to traverse egg info dir
*.egg-info,
# GitHub configs
.github,
# Cache files of MyPy
.mypy_cache,
# Cache files of pytest
.pytest_cache,
# Temp dir of pytest-testmon
.tmontmp,
# Countless third-party libs in venvs
.tox,
# Occasional virtualenv dir
.venv,
# VS Code
.vscode,
# Temporary build dir
build,
# This contains sdists and wheels that we don't want to check
dist,
# Metadata of `pip wheel` cmd is autogenerated
pip-wheel-metadata,
# IMPORTANT: avoid using ignore option, always use extend-ignore instead
# Completely and unconditionally ignore the following errors:
extend-ignore =
# Legitimate cases, no need to "fix" these violations:
# E501: "line too long", its function is replaced by `flake8-length`
E501,
# W505: "doc line too long", its function is replaced by `flake8-length`
W505,
# I: flake8-isort is drunk + we have isort integrated into pre-commit
I,
# WPS326: "Found implicit string concatenation" -- nothing bad about this
WPS326,
# FIXME: These stdlib errors need fixing and removal
# E402: module level import not at top of file
E402,
# FIXME: These `flake8-logging-format` errors need fixing and removal
# G010: Logging statement uses 'warn' instead of 'warning'
G010,
# FIXME: These `flake8-length` errors need fixing and removal
# LN001: code line is too long
LN001,
# LN002: doc/comment line is too long
LN002,
# FIXME: These `flake8-annotations` errors need fixing and removal
# SC100: Possibly misspelt word / comments
SC100,
# SC200: Possibly misspelt word / names
SC200,
# FIXME: These `wemake-python-styleguide` errors need fixing and removal
# WPS110: Found wrong variable name
WPS110,
# WPS111: Found too short name
WPS111
# WPS204: Found overused expression
WPS204
# WPS210: Found too many local variables
WPS210
# WPS221: Found line with high Jones Complexity
WPS221
# WPS226: Found string literal over-use
WPS226
# WPS336: Found explicit string concatenation
WPS336
# WPS339: Found number with meaningless zeros
WPS339
# WPS347: Found vague import that may cause confusion: to_bytes
WPS347
# WPS360: Found an unnecessary use of a raw string
WPS360
# WPS362: Found assignment to a subscript slice
WPS362
# WPS400: "Found wrong magic comment" -- needed for mypy typing
WPS400
# WPS402: Found `noqa` comments overuse
WPS402
# WPS420: Found wrong keyword: pass
WPS420
# WPS422: Found future import: absolute_import
WPS422
# WPS433: Found nested import
WPS433
# WPS436: Found protected module import: _text
WPS436
# WPS453: Found executable mismatch: shebang is present but the file is not executable
WPS453
# WPS463: Found a getter without a return value
WPS463
# WPS504: Found negated condition
WPS504
# WPS528: Found implicit `.items()` usage
WPS528
# WPS531: Found simplifiable returning `if` condition in a function
WPS531
# WPS608: "Found incorrect `super()` call: remove arguments" -- py2 still needs this
WPS608
# https://wemake-python-stylegui.de/en/latest/pages/usage/formatter.html
#format = wemake
# Let's not overcomplicate the code:
max-complexity = 10
# Accessibility/large fonts and PEP8 friendly.
# This is being flexibly extended through the `flake8-length`:
max-line-length = 79
# Allow certain violations in certain files:
# Please keep both sections of this list sorted, as it will be easier for others to find and add entries in the future
per-file-ignores =
# The following ignores have been researched and should be considered permanent
# each should be preceded with an explanation of each of the error codes
# If other ignores are added for a specific file in the section following this,
# these will need to be added to that line as well.
# Count the number of occurrences of each error/warning code and print a report:
statistics = true
# ## Plugin-provided settings: ##
# flake8-eradicate
# E800:
eradicate-whitelist-extend = isort:\s+\w+
# flake8-pytest-style
# PT001:
pytest-fixture-no-parentheses = true
# PT006:
pytest-parametrize-names-type = tuple
# PT007:
pytest-parametrize-values-type = tuple
pytest-parametrize-values-row-type = tuple
# PT023:
pytest-mark-no-parentheses = true
# flake8-rst-docstrings
rst-directives =
spelling
rst-roles =
# Built-in Sphinx roles:
class,
data,
file,
exc,
meth,
mod,
term,
py:class,
py:data,
py:exc,
py:meth,
py:term,
# Sphinx's internal role:
event,
# wemake-python-styleguide
show-source = true