Add typing for __iter__ in sqlalchemy.orm.Query (#7666)

This commit is contained in:
Andrey
2022-04-20 16:55:12 +07:00
committed by GitHub
parent 197dac2c0c
commit 4a701642f2

View File

@@ -1,5 +1,5 @@
from _typeshed import Self
from typing import Any, Generic, TypeVar
from typing import Any, Generic, Iterator, TypeVar
from ..sql.annotation import SupportsCloneAnnotations
from ..sql.base import Executable
@@ -92,7 +92,7 @@ class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffi
def one_or_none(self): ...
def one(self): ...
def scalar(self) -> Any: ... # type: ignore[override]
def __iter__(self): ...
def __iter__(self) -> Iterator[_T]: ...
@property
def column_descriptions(self): ...
def instances(self, result_proxy, context: Any | None = ...): ...