89 lines
1.9 KiB
INI
89 lines
1.9 KiB
INI
[coverage:report]
|
|
precision = 2
|
|
exclude_lines =
|
|
pragma: no cover
|
|
raise NotImplementedError
|
|
raise NotImplemented
|
|
|
|
[coverage:run]
|
|
source = app
|
|
branch = True
|
|
|
|
[mypy]
|
|
plugins = pydantic.mypy
|
|
|
|
strict_optional = True
|
|
warn_redundant_casts = True
|
|
warn_unused_ignores = True
|
|
disallow_any_generics = True
|
|
check_untyped_defs = True
|
|
|
|
disallow_untyped_defs = True
|
|
|
|
[pydantic-mypy]
|
|
init_forbid_extra = True
|
|
init_typed = True
|
|
warn_required_dynamic_aliases = True
|
|
warn_untyped_fields = True
|
|
|
|
[mypy-sqlalchemy.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-alembic.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-loguru.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-asyncpg.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-bcrypt.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-passlib.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-slugify.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-pypika.*]
|
|
ignore_missing_imports = True
|
|
|
|
[flake8]
|
|
format = wemake
|
|
max-line-length = 88
|
|
per-file-ignores =
|
|
# ignore error on builtin names for TypedTable classes, since just mapper for SQL table
|
|
app/db/queries/tables.py: WPS125,
|
|
|
|
# ignore black disabling in some places for queries building using pypika
|
|
app/db/repositories/*.py: E800,
|
|
|
|
app/api/dependencies/authentication.py: WPS201,
|
|
ignore =
|
|
# common errors:
|
|
# FastAPI architecture requires a lot of functions calls as default arguments, so ignore it here.
|
|
B008,
|
|
# docs are missing in this project.
|
|
D, RST
|
|
|
|
# WPS: 3xx
|
|
# IMO, but the obligation to specify the base class is redundant.
|
|
WPS306,
|
|
|
|
# WPS: 4xx
|
|
# FastAPI architecture requires a lot of complex calls as default arguments, so ignore it here.
|
|
WPS404,
|
|
# again, FastAPI DI architecture involves a lot of nested functions as DI providers.
|
|
WPS430,
|
|
# used for pypika operations
|
|
WPS465,
|
|
|
|
# WPS: 6xx
|
|
# pydantic defines models in dataclasses model style, but not supported by WPS.
|
|
WPS601,
|
|
no-accept-encodings = True
|
|
nested-classes-whitelist=Config
|
|
inline-quotes = double
|