-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.cfg
199 lines (182 loc) · 5.21 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
# All configuration for plugins and other utils is defined here.
# Read more about `setup.cfg`:
# https://docs.python.org/3/distutils/configfile.html
[flake8]
format = wemake
show-source = True
statistics = True
doctests = True
enable-extensions = G
# Flake plugins:
max-line-length = 80
max-complexity = 6
radon-max-cc = 10
radon-show-closures = True
radon-no-assert = True
inline-quotes = double
nested-classes-whitelist = Meta, Media
# Excluding some directories:
exclude = .git,
__pycache__,
.venv,
.eggs,
*.egg,
test_proj
ignore =
D100, D104, D106, D401, X100, W503, WPS306, WPS317, WPS121, WPS323, D105,
WPS115, WPS226, WPS348, E203
;2 C901 'BitField.__init__' is too complex (8)
C901
;4 N806 variable 'XOR_OPERATOR' in function should be lowercase
N806
;1 R701 '__init__' is too complex (12)
R701
;3 S301 Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
S301
;73 WPS110 Found wrong variable name: value
WPS110
;30 WPS111 Found too short name: i < 2
WPS111
;2 WPS125 Found builtin shadowing: filter
WPS125
;1 WPS202 Found too many module members: 12 > 7
WPS202
;7 WPS204 Found overused expression: isinstance(value, Bit); used 11 > 7
WPS204
;2 WPS210 Found too many local variables: 7 > 5
WPS210
;2 WPS211 Found too many arguments: 7 > 5
WPS211
;4 WPS214 Found too many methods: 10 > 7
WPS214
;10 WPS218 Found too many `assert` statements: 6 > 5
WPS218
;3 WPS221 Found line with high Jones Complexity: 15 > 14
WPS221
;3 WPS229 Found too long ``try`` body length: 2 > 1
WPS229
;2 WPS231 Found too high function cognitive complexity: 14 > 12
WPS231
;1 WPS232 Found too high module cognitive complexity: 14.0 > 8
WPS232
;8 WPS432 Found magic number: 63
WPS432
;3 WPS433 Found nested import
WPS433
;9 WPS437 Found protected attribute usage: _keys
WPS437
;5 WPS440 Found block variables overlap: flag
WPS440
;6 WPS441 Found control variable used after block: flag
WPS441
;1 WPS504 Found negated condition
WPS504
;1 WPS524 Found self assignment with refactored assignment
WPS524
;5 WPS609 Found direct magic attribute usage: __dict__
WPS609
;1 C409 Unnecessary list passed to tuple() - rewrite as a tuple literal.
C409
;17 C812 missing trailing comma
C812
;1 C815 missing trailing comma in Python 3.5+
C815
;3 CCE001 AutocompleteFilter.is_multiple should be after AutocompleteFilter.Media
CCE001
;11 D101 Missing docstring in public class
D101
;28 D102 Missing docstring in public method
D102
;8 D103 Missing docstring in public function
D103
;3 D107 Missing docstring in __init__
D107
;3 E501 line too long (86 > 80 characters)
E501
;3 WPS220 Found too deep nesting: 24 > 20
WPS220
;1 WPS305 Found `f` string
WPS305
;1 WPS326 Found implicit string concatenation
WPS326
;2 WPS337 Found multiline conditions
WPS337
;2 WPS338 Found incorrect order of methods in a class
WPS338
;1 WPS352 Found multiline loop
WPS352
;1 WPS458 Found imports collision: functools
WPS458
;1 WPS503 Found useless returning `else` statement
WPS503
;2 WPS529 Found implicit `.get()` dict usage
WPS529
per-file-ignores =
tests/**/*.py: S101 WPS442 WPS412
tests/models/__init__.py: F401 WPS412
src/*/**/__init__.py: F401 WPS300 WPS412
src/*/__init__.py: WPS412
[isort]
# isort configuration:
# https://github.com/timothycrosley/isort/wiki/isort-Settings
include_trailing_comma = true
# See https://github.com/timothycrosley/isort#multi-line-output-modes
multi_line_output = 3
# Should be: 80 - 1
line_length = 79
skip = __init__.py, migrations
force_grid_wrap = 0
use_parentheses = True
src_paths = src,tests
[darglint]
# darglint configuration:
# https://github.com/terrencepreilly/darglint
strictness = long
[mypy]
python_version = 3.9
allow_redefinition = False
check_untyped_defs = True
disallow_any_explicit = True
disallow_any_generics = True
disallow_untyped_calls = True
ignore_errors = False
ignore_missing_imports = True
implicit_reexport = False
strict_equality = True
no_implicit_optional = True
warn_unused_ignores = True
warn_redundant_casts = True
warn_unused_configs = True
warn_unreachable = True
warn_no_return = True
[mypy-server.*.migrations.*]
ignore_errors = True
[mypy-server.apps.*.models]
# FIXME: remove this line, when `django-stubs` will stop
# using `Any` inside.
disallow_any_explicit = False
[doc8]
ignore-path = docs/_build
max-line-length = 80
sphinx = True
[tool:pytest]
# Timeout for tests, so they can not take longer
# than this amout of seconds.
# You should adjust this value to be as low as possible.
# Configuration:
# https://pypi.org/project/pytest-timeout/
timeout = 5
# Directories that are not visited by pytest collector:
norecursedirs = *.egg .eggs dist build docs .tox .git __pycache__
# You will need to measure your tests speed with `-n auto` and without it,
# so you can see whether it gives you any performance gain, or just gives
# you an overhead.
addopts =
--strict-markers
--tb=short
--fail-on-template-vars
--reuse-db
--cov=src
--cov-branch
--cov-report=
--cov-fail-under=10