diff --git a/django_stubs_ext/django_stubs_ext/patch.py b/django_stubs_ext/django_stubs_ext/patch.py index 03bf7f23e..45767c6dc 100644 --- a/django_stubs_ext/django_stubs_ext/patch.py +++ b/django_stubs_ext/django_stubs_ext/patch.py @@ -8,6 +8,7 @@ from django.core.paginator import Paginator from django.db.models.fields import Field from django.db.models.fields.related import ForeignKey +from django.db.models.lookups import Lookup from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from django.forms.formsets import BaseFormSet @@ -57,6 +58,7 @@ def __repr__(self) -> str: MPGeneric(BaseModelFormSet), MPGeneric(Feed), MPGeneric(FileProxyMixin), + MPGeneric(Lookup), # These types do have native `__class_getitem__` method since django 3.1: MPGeneric(QuerySet, (3, 1)), MPGeneric(BaseManager, (3, 1)),