You will have to explicitly provide type hints.
# views.py class ListCarsView(ListAPIView): def get_queryset(self): objects: CarQuerySet = Car.objects # Type hint return objects.with_wheels() # yellow