Static type checking with mypy
doesn't work
#6
Labels
api
Relating to the Django RF API
enhancement
New feature or request
help wanted
Extra attention is needed
Went down a rabbit-hole with the following plugins trying to enable mypy so we can have static type checking on the backend API.
django-configurations
via this threadI think the combination of django-configurations and django-restframework are screwing up
mypy
's plugin system.Ultimately I got blocked at this issue and found no way around it: typeddjango/django-stubs#461. So I'm dropping static typing via
mypy
for now.I had the following configurations setup to get to the point of getting this error whenever I tried to import
mypy_django_plugin.main
:backend/mypy.ini
backend/configurations_mypy_django_plugin.py
Running
py -3.9 -m mypy api --show-traceback
gives this error message:I have not yet tried using the latest developer build as suggested by the error message (
Please try using mypy master on GitHub: https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
).The text was updated successfully, but these errors were encountered: