diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..1fcbd14 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,16 @@ +[mypy] + +check_untyped_defs = True +disallow_incomplete_defs = True +disallow_untyped_defs = True +disallow_any_generics = True +disallow_untyped_calls = True +disallow_untyped_decorators = True +disallow_subclassing_any = True +ignore_missing_imports = True +strict_optional = True +strict_equality = True +warn_redundant_casts = True +warn_return_any = True +warn_unused_configs = True +warn_unused_ignores = True diff --git a/setup.py b/setup.py index 0203cbf..97ac1c3 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ extras_require = { 'lint': [ "flake8==3.4.1", "isort>=4.2.15,<5", + "mypy==0.701", "pydocstyle>=3.0.0,<4", ], 'doc': [ diff --git a/tox.ini b/tox.ini index 6372125..e7e9920 100644 --- a/tox.ini +++ b/tox.ini @@ -38,6 +38,7 @@ whitelist_externals=make basepython=python extras=lint commands= + mypy -p {toxinidir}/ --config-file {toxinidir}/mypy.ini flake8 {toxinidir}/ {toxinidir}/tests isort --recursive --check-only --diff {toxinidir}/ {toxinidir}/tests pydocstyle {toxinidir}/ {toxinidir}/tests