Add basic mypy linting

Based on pytest setup, though more lax. Currently only the tests are
annotated so only helpful for them.

Fix #721.
This commit is contained in:
Ran Benita
2021-10-30 12:18:11 +03:00
parent 9ddb274f23
commit 787b8d9c14
5 changed files with 32 additions and 6 deletions

View File

@@ -58,3 +58,19 @@ setproctitle = setproctitle
[flake8]
max-line-length = 100
[mypy]
mypy_path = src
# TODO: Enable this & fix errors.
# check_untyped_defs = True
disallow_any_generics = True
ignore_missing_imports = True
no_implicit_optional = True
show_error_codes = True
strict_equality = True
warn_redundant_casts = True
warn_return_any = True
warn_unreachable = True
warn_unused_configs = True
# TODO: Enable this & fix errors.
# no_implicit_reexport = True