Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
117 lines (94 sloc) 2.87 KB
# All configuration for plugins and other utils is defined here.
# Read more about `setup.cfg`:
# https://docs.python.org/3/distutils/configfile.html
[coverage:run]
branch = True
omit =
server/*/migrations/*.py
[flake8]
format = wemake
show-source = True
statistics = False
doctests = True
# Flake plugins:
max-line-length = 80
max-complexity = 6
inline-quotes = single
accept-encodings = utf-8
isort-show-traceback = True
# Excluding some directories:
exclude = .git,__pycache__,.venv,.eggs,*.egg
# Disable some pydocstyle checks:
ignore = D100, D104, D106, D401, X100, W504
# Docs: https://github.com/snoack/flake8-per-file-ignores
# You can completely or partially disable our custom checks,
# to do so you have to ignore `WPS` letters for all python files:
per-file-ignores =
# Allow migrations to be named differently:
server/apps/*/migrations/*.py: WPS102
# Allow `__init__.py` with logic for configuration:
server/settings/*.py: WPS226, WPS407, WPS412, WPS432
# Enable `assert` keyword and magic numbers for tests:
tests/*.py: S101, WPS432
[tool:pytest]
# Django options:
DJANGO_SETTINGS_MODULE = server.settings
# 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:
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. See `docs/template/development-process.rst`.
addopts =
--strict
--tb=short
--doctest-modules
--fail-on-template-vars
# -n auto
# --boxed
--cov=server
--cov-report=term-missing:skip-covered
--cov-report=html
--cov-fail-under=90
[isort]
# See https://github.com/timothycrosley/isort#multi-line-output-modes
multi_line_output = 3
include_trailing_comma = true
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
default_section = FIRSTPARTY
# Should be: 80 - 1
line_length = 79
[mypy]
# The mypy configurations: https://mypy.readthedocs.io/en/latest/config_file.html
python_version = 3.7
check_untyped_defs = True
# disallow_any_explicit = True
disallow_any_generics = True
disallow_untyped_calls = True
disallow_untyped_decorators = 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
plugins =
mypy_django_plugin.main,
mypy_drf_plugin.main
[mypy.plugins.django-stubs]
django_settings_module = server.settings
[mypy-server.*.migrations.*]
# Django migrations should not produce any errors:
ignore_errors = True
[doc8]
ignore-path = docs/_build
max-line-length = 80
sphinx = True
You can’t perform that action at this time.