diff --git a/django-stubs/db/models/query.pyi b/django-stubs/db/models/query.pyi index 3b55ce16c..e82cebf1e 100644 --- a/django-stubs/db/models/query.pyi +++ b/django-stubs/db/models/query.pyi @@ -43,7 +43,7 @@ class NamedValuesListIterable(ValuesListIterable[NamedTuple]): class FlatValuesListIterable(BaseIterable[_Row]): def __iter__(self) -> Iterator[_Row]: ... -class _QuerySet(Generic[_T, _Row], Collection[_Row], Reversible[_Row], Sized): +class _QuerySet(Generic[_T, _Row], Reversible[_Row], Iterable[_Row], Sized): model: type[_T] query: Query _iterable_class: type[BaseIterable] @@ -186,7 +186,6 @@ class _QuerySet(Generic[_T, _Row], Collection[_Row], Reversible[_Row], Sized): def resolve_expression(self, *args: Any, **kwargs: Any) -> Any: ... def __iter__(self) -> Iterator[_Row]: ... def __aiter__(self) -> AsyncIterator[_Row]: ... - def __contains__(self, x: object) -> bool: ... @overload def __getitem__(self, i: int) -> _Row: ... @overload diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index 8e6d87320..7158e0a71 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -421,7 +421,6 @@ django.contrib.gis.db.models.PositiveSmallIntegerField.formfield django.contrib.gis.db.models.PositiveSmallIntegerField.integer_field_class django.contrib.gis.db.models.Q.XOR django.contrib.gis.db.models.Q.resolve_expression -django.contrib.gis.db.models.QuerySet.__contains__ django.contrib.gis.db.models.QuerySet.__deepcopy__ django.contrib.gis.db.models.QuerySet.__reversed__ django.contrib.gis.db.models.QuerySet.__xor__ @@ -968,7 +967,6 @@ django.db.models.PositiveSmallIntegerField.formfield django.db.models.PositiveSmallIntegerField.integer_field_class django.db.models.Q.XOR django.db.models.Q.resolve_expression -django.db.models.QuerySet.__contains__ django.db.models.QuerySet.__deepcopy__ django.db.models.QuerySet.__reversed__ django.db.models.QuerySet.__xor__ @@ -1345,7 +1343,6 @@ django.db.models.options.Options.local_concrete_fields django.db.models.options.Options.many_to_many django.db.models.options.Options.related_objects django.db.models.query.EmptyQuerySet.__init__ -django.db.models.query.QuerySet.__contains__ django.db.models.query.QuerySet.__deepcopy__ django.db.models.query.QuerySet.__reversed__ django.db.models.query.QuerySet.__xor__