diff --git a/django-stubs/db/models/query.pyi b/django-stubs/db/models/query.pyi index 6f449bf77..3f20f1b80 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] @@ -178,7 +178,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 72a8467b5..95bbe0ab7 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -436,7 +436,6 @@ django.contrib.gis.db.models.Q.__init__ django.contrib.gis.db.models.Q.check django.contrib.gis.db.models.Q.flatten 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__ @@ -1014,7 +1013,6 @@ django.db.models.Q.__init__ django.db.models.Q.check django.db.models.Q.flatten 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__ @@ -1408,7 +1406,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__