-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.cfg
152 lines (130 loc) · 3.34 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
[tool:pytest]
testpaths = tests
asyncio_mode = auto
addopts =
--cov=app
--no-cov-on-fail
--cov-report term-missing
filterwarnings =
ignore::DeprecationWarning:redis
[coverage:run]
concurrency = thread,greenlet
[coverage:report]
precision = 2
exclude_lines =
pragma: no cover
raise NotImplementedError
raise NotImplemented
[mypy]
disallow_untyped_defs = True
strict_optional = True
[mypy-redis.*]
ignore_missing_imports = True
[mypy-alembic.*]
ignore_missing_imports = True
[mypy-asyncpg.*]
ignore_missing_imports = True
[mypy-loguru.*]
ignore_missing_imports = True
[mypy-mako.*]
ignore_missing_imports = True
[mypy-saq.*]
ignore_missing_imports = True
[mypy-sqlalchemy.*]
ignore_missing_imports = True
[mypy-app.db.migrations.*]
ignore_errors = True
[isort]
profile = black
multi_line_output = 3
include_trailing_comma = True
line_length = 88
force_grid_wrap = 0
combine_as_imports = True
# move imports to the top of the file
float_to_top=true
[flake8]
# See https://flake8.pycqa.org/en/latest/user/configuration.html#project-configuration
max-line-length = 88
max-awaits = 10
max-local-variables = 10
max-module-members = 10
max-arguments = 10
nested-classes-whitelist = Config, Meta, Params
exclude = app/db/migrations
per-file-ignores =
# docstings for module
*/__init__.py:D104
# too many imports
app/bot/commands/*.py:WPS201,D104
app/services/botx_user_search.py:WPS232
app/main.py:WPS201
# line too long
app/resources/strings.py:E501
tests/*:D100,WPS110,WPS116,WPS118,WPS201,WPS204,WPS235,WPS430,WPS442,WPS432
# too many public attrs
# too many args
# wrong var name
app/services/answer_error.py:WPS110,WPS211,WPS230
# too many imported names, subprocess usage
app/bot/commands/common.py:WPS235,S404,S603
# names shadowing
# `%` string formatting
app/db/sqlalchemy.py:WPS442,WPS323
no-accept-encodings = True
inline-quotes = double
# See https://wemake-python-stylegui.de/en/latest/pages/usage/violations/index.html
ignore =
# Bxxx
# Function calls in arguments definition is part of fastapi and botx di system
B008,
# Cxxx
# Handled by black
C8,
# Dxxx
# Docstrings for public classes
D101,
# Docstrings for public methods
D102,
# Docstrings for public functions
D103,
# Docstrings for public nested classes like Meta or Config not necessary
D106,
# Docstrings for __init__ methods
D107,
# Allow empty line after docstings
D202,
# Exxx
# Black handles whitespace before ':'
E203,
# Sxxx
# Asserts are useful.
S101,
# Mako templates are used as messages, so no xss attacks
S702,
# WPSxxx
# Allow upper-case constants
WPS115,
# Too many module members
WPS202,
# Too many methods in class
WPS214,
# Does not play well with forward type references
WPS226,
# f-strings are useful
WPS305,
# Required base in class definition is strange
WPS306,
# Context manager with too many assignments
WPS316,
# Forbids to use implicit string concatenation
WPS326,
# Allow walrus operator
WPS332,
# Allow lines that starts with a dot
WPS348,
# Objects that are returned from fastapi and botx as di system parts should be available
WPS404,
[darglint]
# See https://github.com/terrencepreilly/darglint#strictness-configuration
strictness = long