-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.cfg
164 lines (144 loc) · 3.73 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
[tool:pytest]
junit_family = xunit2
norecursedirs =
*.egg
.eggs
dist
build
docs
.tox
.git
__pycache__
addopts =
--strict-config
--strict-markers
--doctest-modules
--cov=.
--cov-config=setup.cfg
--cov-report=term
--cov-report=xml
# test shouldn't take longer than 10s
timeout = 10
[flake8]
format = wemake
show-source = True
statistics = False
doctests = True
enable-extensions = G
# plugins
max-complexity = 6
max-line-length = 80
multiline-quotes = '''
pytest-fixture-no-parentheses = true
exclude =
.git
__pycache__
.venv
.eggs
*.egg
ignore =
# W503: line break before binary operator
W503,
per-file-ignores =
__init__.py:
# D104: Missing docstring in public package
D104,
exception_dispatcher/dispatchers/__init__.py:
# WPS410: Found wrong metadata variable: __all__
WPS410,
# WPS412: Found `__init__.py` module with logic
WPS412,
exception_dispatcher/dispatchers/main.py:
# WPS324: Found inconsistent `return` statement
WPS324,
tests/*.py:
# D100: Missing docstring in public module
D100,
# D104: Missing docstring in public package
D104
# S101: use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
S101,
# WPS432: Found magic number
WPS432,
# WPS442: Found outer scope names shadowing
WPS442,
tests/settings.py:
# WPS407: Found mutable module constant
WPS407,
[darglint]
docstring_style = numpy
strictness = long
[doc8]
ignore-path = docs/_build
max-line-length = 80
sphinx = True
[isort]
line_length = 80
indent = 4
include_trailing_comma = true
use_parentheses = true
multi_line_output = 3
# add one line between `import abc` and `from abc import ABC`
lines_between_types = 1
# split imports to multline, when 2 or more imports in one line
force_grid_wrap = 2
# add projects module to first party category
known_first_party = exception_dispatcher
# place imports, which section cannot be determined, to third party category
default_section = THIRDPARTY
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
[mypy]
allow_redefinition = False
check_untyped_defs = True
disallow_untyped_decorators = True
disallow_any_explicit = True
disallow_any_generics = True
disallow_untyped_calls = True
ignore_errors = False
ignore_missing_imports = True
implicit_reexport = False
strict_optional = True
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
pretty = True
show_error_codes = True
plugins =
mypy_django_plugin.main,
mypy_drf_plugin.main
[mypy.plugins.django-stubs]
django_settings_module = "tests.settings"
[mypy-exception_dispatcher.types] │
disallow_any_explicit = False
[coverage:run]
branch = True
dynamic_context = test_function
source = exception_dispatcher
omit = *conftest.py, pytest_plugins/*, */tests/*, .venv/*
data_file = .tests_reports/.coverage
[coverage:report]
skip_covered = True
show_missing = True
sort = Cover
fail_under = 100
exclude_lines =
pragma: no cover
# debug-only code
if settings\.DEBUG
# `mypy` only related code
if typing\.TYPE_CHECKING
if TYPE_CHECKING
# defensive assertion code
raise NotImplementedError
except ImportError
[coverage:xml]
output = .tests_reports/coverage.xml
[coverage:json]
output = .tests_reports/coverage.json
[coverage:html]
directory = .tests_reports/htmlcov
show_contexts = true