You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you sure that you inherit e.g. GenericAPIView[MyModel] and not simply GenericAPIView? It's exactly the use of type variable here - you must pass a related model type.
@sterliakov You're right, I wasn't using that. It would be good to update the FAQ in the readme to include this example as well (there's one already for serializers).
https://github.com/typeddjango/djangorestframework-stubs/blob/master/rest_framework-stubs/generics.pyi#L33
The missing
get_queryset()
causes any call tosuper().get_queryset()
to be typed asQuerySet[Any, Any]
.python
version: 3.9.10django
version: 4.2.3mypy
version: 1.4.1django-stubs
version: 4.2.3The text was updated successfully, but these errors were encountered: