diff --git a/ext/django_stubs_ext/patch.py b/ext/django_stubs_ext/patch.py index 795726abb..5d583767f 100644 --- a/ext/django_stubs_ext/patch.py +++ b/ext/django_stubs_ext/patch.py @@ -15,7 +15,7 @@ from django.db.models.fields.related_descriptors import ReverseManyToOneDescriptor from django.db.models.lookups import Lookup from django.db.models.manager import BaseManager -from django.db.models.query import QuerySet +from django.db.models.query import QuerySet, RawQuerySet from django.forms.formsets import BaseFormSet from django.forms.models import BaseModelForm, BaseModelFormSet, ModelChoiceField from django.utils.connection import BaseConnectionHandler @@ -78,6 +78,7 @@ def __repr__(self) -> str: MPGeneric(BaseManager, (3, 1)), # These types do have native `__class_getitem__` method since django 4.1: MPGeneric(ForeignKey, (4, 1)), + MPGeneric(RawQuerySet), ]