Skip to content

Instantly share code, notes, and snippets.

@jefftriplett
Created December 9, 2019 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefftriplett/a57e565a8fe5b3db002e2afe32d39687 to your computer and use it in GitHub Desktop.
Save jefftriplett/a57e565a8fe5b3db002e2afe32d39687 to your computer and use it in GitHub Desktop.
pytest + mypy + django + drf
[mypy]
python_version = 3.7
ignore_missing_imports = True
plugins =
mypy_django_plugin.main,
mypy_drf_plugin.main
strict_optional = True
[mypy.plugins.django-stubs]
django_settings_module = "config.test_settings"
[pytest]
addopts = -v -W all --mypy
DJANGO_SETTINGS_MODULE = config.test_settings
# testpaths = tests <-- you probably don't need this...
...
django-stubs==1.3.0
django-test-plus==1.4.0
djangorestframework-stubs==1.0.0
pytest==5.0.1
pytest-django==3.5.1
pytest-mypy==0.4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment