-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.cfg
166 lines (146 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
[mypy]
plugins = pydantic.mypy
warn_unused_configs = True
disallow_any_generics = True
disallow_subclassing_any = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_return_any = True
no_implicit_reexport = True
strict_equality = True
show_error_codes = True
[mypy-tests.*]
# https://github.com/python/mypy/issues/9689
disallow_untyped_decorators = False
[mypy-aiofiles.*]
ignore_missing_imports = True
[mypy-pytest.*]
ignore_missing_imports = True
[mypy-respx.*]
ignore_missing_imports = True
[isort]
profile = black
multi_line_output = 3
[darglint]
# darglint configuration:
# https://github.com/terrencepreilly/darglint
strictness = short
docstring_style = sphinx
[flake8]
format = wemake
show-source = true
max-line-length = 88
inline-quotes = double
nested_classes_whitelist = Config
allowed_domain_names = data, handler, result, content, file
per-file-ignores =
pybotx/bot/bot.py:WPS203,
pybotx/constants.py:WPS432,
pybotx/__init__.py:WPS203,WPS410,WPS412,F401,
# https://github.com/wemake-services/wemake-python-styleguide/issues/2172
pybotx/bot/handler_collector.py:WPS226,WPS437,
pybotx/bot/handler.py:WPS226,
pybotx/client/notifications_api/internal_bot_notification.py:WPS202,
pybotx/client/smartapps_api/smartapp_custom_notification.py:WPS118,
# Complex model converting
pybotx/models/message/incoming_message.py:WPS232,
# WPS reacts at using `}` in f-strings
pybotx/models/message/mentions.py:WPS226,
# Protected attr usage is OK with async_files
pybotx/models/async_files.py:WPS437,
pybotx/models/api_base.py:WPS232,WPS231,WPS110,WPS440
# This ignores make logger code cleaner
pybotx/logger.py:WPS219,WPS226
# Allow using methods names with trailing underscore
pybotx/models/enums.py:WPS120
tests/*:DAR101,E501,WPS110,WPS114,WPS116,WPS118,WPS202,WPS221,WPS226,WPS237,WPS402,WPS420,WPS428,WPS430,WPS432,WPS441,WPS442,WPS520,PT011,S105,S106,WPS437,WPS609,WPS231
# Import ignores for README lint
.snippets/*:F403,F405,WPS347,WPS421,S106,WPS237
ignore =
# This project uses google style docstring
RST,
# Upper-case constant in class
WPS115,
# Too many module members
WPS202,
# Too many arguments
WPS211,
# f-strings
WPS305,
# Class without base class
WPS306,
# Implicit string concatenation
WPS326,
# Walrus operator
WPS332,
# Explicit string concatenation
WPS336,
# Module docstring
D100,
# Class docstring
D101,
# Method docstring
D102,
# Function docstring
D103,
# Package docstring
D104,
# Magic method docstring
D105,
# Nested class docstring
D106,
# __init__ docstring
D107,
# Allow empty line after docstring
D202,
# Line break before binary operator
W503,
# Too many methods
WPS214,
# Too many imports
WPS201,
# Overused expression
WPS204,
# Too many local vars
WPS210,
# Too many await expressions
WPS217,
# Too many imported names from module
WPS235,
# Multiple conditions
WPS337,
# Nested imports (often used with ImportError)
WPS433,
# Forbidden `@staticmethod`
WPS602,
# Allow certain dunder methods
WPS603,
# Forbidden `assert`
S101,
[tool:pytest]
testpaths = tests
addopts =
--strict-markers
--tb=short
--cov=pybotx
--cov-report=term-missing
--cov-branch
--no-cov-on-fail
--cov-fail-under=100
markers =
wip: "Work in progress"
mock_authorization: "Mock authorization"
[coverage:report]
exclude_lines =
pragma: no cover
if TYPE_CHECKING:
raise NotImplementedError
except ImportError:
... # noqa: WPS428
def __repr__