Skip to content

Commit 4a70164

Browse files
authored
Add typing for __iter__ in sqlalchemy.orm.Query (#7666)
1 parent 197dac2 commit 4a70164

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stubs/SQLAlchemy/sqlalchemy/orm/query.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from _typeshed import Self
2-
from typing import Any, Generic, TypeVar
2+
from typing import Any, Generic, Iterator, TypeVar
33

44
from ..sql.annotation import SupportsCloneAnnotations
55
from ..sql.base import Executable
@@ -92,7 +92,7 @@ class Query(_SelectFromElements, SupportsCloneAnnotations, HasPrefixes, HasSuffi
9292
def one_or_none(self): ...
9393
def one(self): ...
9494
def scalar(self) -> Any: ... # type: ignore[override]
95-
def __iter__(self): ...
95+
def __iter__(self) -> Iterator[_T]: ...
9696
@property
9797
def column_descriptions(self): ...
9898
def instances(self, result_proxy, context: Any | None = ...): ...

0 commit comments

Comments
 (0)