-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.flake8
284 lines (282 loc) · 5.9 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# Flake8 configuration file.
# Written in INI language.
# See https://flake8.pycqa.org/en/latest/user/configuration.html
#
# Sort all entries alphabetically!
#
# Keep Flake8 plugins in sync with `requirements-dev.txt` and
# `.pre-commit-config.yaml`!
[flake8]
# Print the total number of errors.
count = true
docstring-convention = numpy
# Enable PyFlakes syntax checking of doctests in docstrings.
doctests = true
extend-exclude =
.build/,
build/,
.cache/,
cache/,
*.cover,
cover/,
.coverage,
.coverage.*,
develop-eggs/,
dist/,
*.egg,
*.egg-info/,
.eggs/,
eggs/,
.git,
.hypothesis/,
.installed.cfg,
lib/,
lib64/,
.mypy_cache/,
.nox,
__pycache__,
__pypackages__,
.pytest_cache/,
.Python,
.pytype/,
sdist/,
.tox,
wheels/,
# Virtual Python environments
*env*/,
*venv*/,
*ENV*/,
*VENV*/,
extend-ignore =
### Allow assert statements for consitency checks ###
# S101: Use of assert detected
S101,
### Allow docstring summaries that are longer than one line ###
# D205: 1 blank line required between summary line and description
# D400: First line should end with a period
D205,
D400,
### Compatibility with black ###
# E203: whitespace before ':'
# W503: line break before binary operator
E203,
W503,
### Bandit ###
# S404: Consider possible security implications associated with the
# subprocess module
# S603: subprocess call - check for execution of untrusted input
S404,
S603,
### flake8-bugbear ###
# B028 No explicit stacklevel keyword argument found.
B028,
### pep8-naming ###
# N806: variable in function should be lowercase
# N813: camelcase imported as lowercase
N806,
N813,
extend-select =
### Compatibility with black ###
# W504: line break after binary operator
W504,
# List of glob patterns to include for checks.
filename = *.py
# Number of spaces used for indentation.
indent-size = 4
# Maximum allowed McCabe complexity
max-complexity = 20
# Maximum allowed line length of a comment or docstring.
max-doc-length = 72
# Maximum allowed line length for code.
max-line-length = 79
# Require specific plugins to be installed before running.
require-plugins =
flake8-bandit,
flake8-bugbear,
flake8-builtins,
flake8-comprehensions,
flake8-docstrings,
flake8-isort,
flake8-logging-format,
flake8-pytest-style,
flake8-rst-docstrings,
pep8-naming,
# Allowed reStructuredText directives.
# See https://github.com/peterjc/flake8-rst-docstrings/pull/16
rst-directives =
autosummary,
moduleauthor,
# reStructuredText admonitions from
# https://docutils.sourceforge.io/docs/ref/rst/directives.html
attention,
caution,
danger,
error,
hint,
important,
note,
tip,
todo,
warning,
# Spinx-specific directives from
# https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html
centered,
code-block,
codeauthor,
deprecated,
glossary,
highlight,
hlist,
index,
literalinclude,
math,
note,
only,
productionlist,
rubric,
sectionauthor,
seealso,
tabularcolumns,
toctree,
versionadded,
versionchanged,
warning,
# Spinx-specific domains from
# https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html
attribute,
class,
classmethod,
currentmodule,
data,
decorator,
decoratormethod,
default-domain,
exception,
function,
method,
module,
property,
staticmethod,
# sphinx.ext.doctest directives from
# https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html
doctest,
testcleanup,
testcode,
testoutput,
testsetup,
# Allowed reStructuredText roles.
# See https://github.com/peterjc/flake8-rst-docstrings/pull/16
rst-roles =
ref,
# Self-defined roles:
bash,
# reStructuredText Interpreted Text Roles from
# https://docutils.sourceforge.io/docs/ref/rst/roles.html
code,
emphasis,
literal,
math,
pep-reference,
raw,
rfc-reference,
strong,
subscript,
superscript,
title-reference,
# Spinx-specific roles from
# https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html
abbr,
any,
code,
command,
dfn,
doc,
download,
envvar,
eq,
file,
guilabel,
kbd,
keyword,
mailheader,
makevar,
manpage,
math,
menuselection,
mimetype,
newsgroup,
numref,
option,
pep,
program,
ref,
regexp,
rfc,
samp,
term,
token,
# Spinx-specific domains from
# https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html
attr,
class,
const,
data,
exc,
func,
meth,
mod,
obj,
# Allowed reStructuredText roles.
# See https://github.com/peterjc/flake8-rst-docstrings/pull/62
rst-substitutions =
# Self-defined substitutions:
dev_guide,
GNU_GPLv3,
Git,
Git_Book,
GitHub,
Issue,
Q&A,
GCC,
Lmod,
Gromacs,
Python,
format_specifier,
PyPI,
pip,
virtual_Python_environment,
venv,
Black,
isort,
Flake8,
pytest,
NumPy,
SciPy,
matplotlib,
MDAnalysis,
MDA_user_guide,
file-like_object,
npy_file,
npz_archive,
RTD,
Sphinx,
RST,
RST_option_list,
NumPy_docstring_convention,
MDA_trj,
MDA_trjs,
trajectory_and_topology_formats,
supported_coordinate_formats,
supported_topology_formats,
selection_syntax,
explanation_of_these_terms,
MDA_always_guesses_atom_masses,
shfmt,
shfmt-py,
shellcheck,
shellcheck-py,
markdownlint,
# Print the source code generating the error/warning in question.
show-source = true
# Count the number of occurrences of each error/warning.
statistics = true