forked from vnmabus/dcor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
146 lines (131 loc) · 3.84 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
[aliases]
test=pytest
[tool:pytest]
addopts = --doctest-modules
norecursedirs = '.*' 'build' 'dist' '*.egg' 'venv' .svn _build docs docs/auto_examples examples
[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,
# 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,
per-file-ignores =
__init__.py:
# Unused modules are allowed in `__init__.py`, to reduce imports
F401,
# 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, WPS432, WPS442
# 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:ts,func,meth,mod,obj,ref,term,
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
[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
implicit_reexport = True