I am configuring mypy for our project and now I run into some issues with DRF. I attemted to follow #371 and #255 but they keep giving issues at runtime. The issue is not that we get a TypeError: type 'ModelViewSet' is not subscriptable, but all sorts of errors that look like they have to do with importing in settings.py.
The issues I'm facing
How is that should be
I should be able to import DRF classes in settings.py and add them to the django_stubs_ext.monkeypatchextras parameter
Bug report
What's wrong
I am configuring mypy for our project and now I run into some issues with DRF. I attemted to follow #371 and #255 but they keep giving issues at runtime. The issue is not that we get a
TypeError: type 'ModelViewSet' is not subscriptable
, but all sorts of errors that look like they have to do with importing insettings.py
.The issues I'm facing
How is that should be
I should be able to import DRF classes in
settings.py
and add them to thedjango_stubs_ext.monkeypatch
extras
parameterSystem information
python
version: 3.11django
version: 4.2.7mypy
version: 1.6.1django-stubs
version: 4.2.6djangorestframework
version: 3.14.0djangorestframework-stubs
version: 3.14.4