-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.cfg
122 lines (103 loc) · 2.9 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
# 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
no-accept-encodings = True
# Flake plugins
max-line-length = 80
max-complexity = 6
radon-max-cc = 10
radon-show-closures = True
radon-no-assert = True
inline-quotes = double
allowed-domain-names = handle
# Excluding some directories:
exclude = .git,
__pycache__,
.venv,
ignore = D100 D104 D106 D401 X100 W503 WPS306 WPS317 WPS121 DJ12 WPS348
per-file-ignores =
src/settings/*.py: WPS226 WPS407 WPS412 WPS432
src/*/migrations/*.py: WPS102 WPS432 E501 DJ01 WPS318 WPS319 C101 WPS458 WPS226 WPS118
WPS114, WPS301, D101 D103 Q000 WPS221 I001 I003 WPS219
src/__init__.py: WPS412
src/*/**/__init__.py: F401 WPS300 WPS412 I001 WPS412 WPS410
src/apps/*/models/enums/**.py: WPS115 WPS412 WPS300 F401
tests/*.py: S101 WPS432 WPS226 WPS442 S106 WPS204 S105
tests/*/**/__init__.py: WPS412 F401 WPS300 WPS410
[tool:pytest]
# Django configuration:
# https://pytest-django.readthedocs.io/en/latest/
DJANGO_SETTINGS_MODULE = src.settings
django_find_project = false
pythonpath = . src
# 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
--nomigrations
--durations=15
--maxfail=20
--cov=src
--cov=tests
--cov-branch
--cov-report=
--cov-fail-under=80
;filterwarnings =
; error
[coverage:run]
omit = src/*/migrations/*
[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.10
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-src.*.migrations.*]
ignore_errors = True
[mypy-src.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