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
The return type of get_queryset on a ListView seems to be _SupportsPagination[Any], which is throwing an error when I try and add a select_related to the queryset.
Apologies if I'm missing something here (entirely possible!), but I've been going back and forth. I can see it's coming from the MultipleObjectMixin.
Bug report
What's wrong
The return type of
get_queryset
on aListView
seems to be_SupportsPagination[Any]
, which is throwing an error when I try and add aselect_related
to the queryset.Apologies if I'm missing something here (entirely possible!), but I've been going back and forth. I can see it's coming from the
MultipleObjectMixin
.django-stubs/django-stubs/views/generic/list.pyi
Line 21 in d283970
There's nothing overly complicated about the model setup here, I just want to add the select related to the base queryset.
How is that should be
super().get_queryset()
should (probably?) not throw a type error when I treat it as a queryset in aListView
System information
python
version: 3.11.5django
version: 5.0.1mypy
version: 1.8.0django-stubs
version: 4.2.7django-stubs-ext
version: 4.2.7The text was updated successfully, but these errors were encountered: