diff --git a/mypy.ini b/mypy.ini --- a/mypy.ini +++ b/mypy.ini @@ -2,6 +2,11 @@ namespace_packages = True warn_unused_ignores = True +# support for django magic: https://github.com/typeddjango/django-stubs +plugins = mypy_django_plugin.main, mypy_drf_plugin.main + +[mypy.plugins.django-stubs] +django_settings_module = swh.auth.tests.app.apptest.settings # 3rd party libraries without stubs (yet) @@ -13,6 +18,3 @@ [mypy-keycloak.*] ignore_missing_imports = True - -[mypy-django.*] -ignore_missing_imports = True diff --git a/requirements-test.txt b/requirements-test.txt --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,5 @@ +django-stubs +djangorestframework-stubs pytest -requests_mock pytest-django +requests_mock