diff --git a/mypy.ini b/mypy.ini index 7ecdbae2..e1234e22 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,55 +1,52 @@ [mypy] namespace_packages = True warn_unused_ignores = True # support for django magic: https://github.com/typeddjango/django-stubs -plugins = mypy_django_plugin.main +plugins = mypy_django_plugin.main, mypy_drf_plugin.main [mypy.plugins.django-stubs] django_settings_module = swh.web.settings.development # 3rd party libraries without stubs (yet) [mypy-bs4.*] ignore_missing_imports = True [mypy-corsheaders.*] ignore_missing_imports = True [mypy-django_js_reverse.*] ignore_missing_imports = True [mypy-htmlmin.*] ignore_missing_imports = True [mypy-magic.*] ignore_missing_imports = True [mypy-pkg_resources.*] ignore_missing_imports = True [mypy-prometheus_client.*] ignore_missing_imports = True [mypy-pygments.*] ignore_missing_imports = True [mypy-pypandoc.*] ignore_missing_imports = True [mypy-pytest.*] ignore_missing_imports = True -[mypy-rest_framework.*] -ignore_missing_imports = True - [mypy-requests_mock.*] ignore_missing_imports = True [mypy-sphinx.*] ignore_missing_imports = True [mypy-sphinxcontrib.*] ignore_missing_imports = True [mypy-swh.docs.*] ignore_missing_imports = True diff --git a/requirements-test.txt b/requirements-test.txt index 6cb2af0f..6822beb7 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,9 +1,10 @@ hypothesis pytest pytest-django pytest-mock -django-stubs < 1.3.0 +django-stubs +djangorestframework-stubs requests-mock swh.core[http] >= 0.0.81 swh.loader.git >= 0.0.55 decorator # dependency of swh.core[http] diff --git a/tox.ini b/tox.ini index 3d48f9cb..7bb4f12d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,30 +1,30 @@ [tox] envlist=flake8,mypy,py3 [testenv] extras = testing deps = pytest-cov commands = pytest \ slow: --hypothesis-profile=swh-web \ !slow: --hypothesis-profile=swh-web-fast \ --cov {envsitepackagesdir}/swh/web --cov-branch {posargs} {envsitepackagesdir}/swh/web [testenv:flake8] skip_install = true deps = flake8 commands = {envpython} -m flake8 \ --exclude=.tox,.git,__pycache__,.eggs,*.egg,node_modules [testenv:mypy] setenv = DJANGO_SETTINGS_MODULE = swh.web.settings.development extras = testing deps = - mypy<0.750 + mypy commands = mypy swh