forked from GAA-UAM/scikit-fda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
212 lines (179 loc) · 5.07 KB
/
setup.cfg
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
[aliases]
test=pytest
[tool:pytest]
env =
EAGER_IMPORT=1
addopts = --doctest-modules
doctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS
norecursedirs = .* build dist *.egg venv .svn _build docs/auto_examples examples docs/auto_tutorial tutorial
[flake8]
ignore =
# No docstring for magic methods
D105,
# No docstrings in __init__
D107,
# Ignore until https://github.com/terrencepreilly/darglint/issues/54 is closed
DAR202,
# Ignore until https://github.com/terrencepreilly/darglint/issues/144 is closed
DAR401,
# Non-explicit exceptions may be documented in raises
DAR402,
# Uppercase arguments like X are common in scikit-learn
N803,
# Uppercase variables like X are common in scikit-learn
N806,
# There are no bad quotes
Q000,
# Google Python style is not RST until after processed by Napoleon
# See https://github.com/peterjc/flake8-rst-docstrings/issues/17
RST201, RST203, RST301,
# assert is used by pytest tests
S101,
# Line break occurred before a binary operator (antipattern)
W503,
# Utils is used as a module name
WPS100,
# Short names like X or y are common in scikit-learn
WPS111,
# We do not like this underscored numbers convention
WPS114,
# Attributes in uppercase are used in enums
WPS115,
# Trailing underscores are a scikit-learn convention
WPS120,
# Cognitive complexity cannot be avoided at some modules
WPS232,
# The number of imported things may be large, especially for typing
WPS235,
# The allowed complexity in f-strings is too low
WPS237,
# We like local imports, thanks
WPS300,
# Dotted imports are ok
WPS301,
# We love f-strings
WPS305,
# Implicit string concatenation is useful for exception messages
WPS306,
# No base class needed
WPS326,
# We allow multiline conditions
WPS337,
# We order methods differently
WPS338,
# We need multine loops
WPS352,
# Assign to a subcript slice is normal behaviour in numpy
WPS362,
# All keywords are beautiful
WPS420,
# We use nested imports sometimes, and it is not THAT bad
WPS433,
# We use list multiplication to allocate list with immutable values (None or numbers)
WPS435,
# Our private modules are fine to import
# (check https://github.com/wemake-services/wemake-python-styleguide/issues/1441)
WPS436,
# Our private objects are fine to import
WPS450,
# Numpy mixes bitwise and comparison operators
WPS465,
# Explicit len compare is better than implicit
WPS507,
# Comparison with not is not the same as with equality
WPS520,
# Found bad magic module function: {0}
WPS413
per-file-ignores =
__init__.py:
# Unused modules are allowed in `__init__.py`, to reduce imports
F401,
# Explicit re-exports allowed in __init__
WPS113,
# Import multiple names is allowed in `__init__.py`
WPS235,
# Logic is allowec in `__init__.py`
WPS412
# There are many datasets
_real_datasets.py: WPS202
# Tests benefit from meaningless zeros, magic numbers and fixtures
test_*.py: WPS339, WPS358, WPS432, WPS442, WPS446
# Examples are allowed to have imports in the middle, "commented code", call print and have magic numbers
plot_*.py: D205, D400, E402, E800, WPS421, WPS432
rst-directives =
# These are sorted alphabetically - but that does not matter
autosummary,data,currentmodule,deprecated,
footbibliography,glossary,
jupyter-execute,
moduleauthor,plot,testcode,
versionadded,versionchanged,
rst-roles =
attr,class,doc,footcite,footcite:p,footcite:t,footcite:ps,footcite:ts,func,meth,mod,obj,ref,term,external:class
allowed-domain-names = data, obj, result, results, val, value, values, var
# Needs to be tuned
max-arguments = 10
max-attributes = 10
max-cognitive-score = 30
max-expressions = 15
max-imports = 20
max-line-complexity = 30
max-local-variables = 15
max-methods = 30
max-module-expressions = 15
max-module-members = 15
max-string-usages = 10
max-try-body-length = 4
ignore-decorators = (property)|(overload)
strictness = long
# Beautify output and make it more informative
format = wemake
show-source = true
doctests = true
[coverage:run]
omit =
# Omit reporting for dataset module
*/datasets/*
# Omit reporting for __init__.py files
*/__init__.py
[isort]
multi_line_output = 3
include_trailing_comma = true
use_parentheses = true
combine_as_imports = 1
skip_glob = **/plot_*.py plot_*.py
[mypy]
strict = True
strict_equality = True
enable_error_code = ignore-without-code
[mypy-fdasrsf.*]
ignore_missing_imports = True
[mypy-findiff.*]
ignore_missing_imports = True
[mypy-GPy.*]
ignore_missing_imports = True
[mypy-joblib.*]
ignore_missing_imports = True
[mypy-lazy_loader.*]
ignore_missing_imports = True
[mypy-matplotlib.*]
ignore_missing_imports = True
[mypy-mpl_toolkits.*]
ignore_missing_imports = True
[mypy-multimethod.*]
ignore_missing_imports = True
[mypy-numpy.*]
ignore_missing_imports = True
[mypy-pandas.*]
ignore_missing_imports = True
[mypy-pytest.*]
ignore_missing_imports = True
[mypy-scipy.*]
ignore_missing_imports = True
[mypy-setuptools.*]
ignore_missing_imports = True
[mypy-skdatasets.*]
ignore_missing_imports = True
[mypy-sklearn.*]
ignore_missing_imports = True
[mypy-sphinx.*]
ignore_missing_imports = True