Skip to content

Commit 5439975

Browse files
fix tee.__iter__ annotation (closes #151)
1 parent 806e85e commit 5439975

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

asyncstdlib/itertools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def __getitem__(
454454
) -> Union[AsyncIterator[T], Tuple[AsyncIterator[T], ...]]:
455455
return self._children[item]
456456

457-
def __iter__(self) -> Iterator[AnyIterable[T]]:
457+
def __iter__(self) -> Iterator[AsyncIterator[T]]:
458458
yield from self._children
459459

460460
async def __aenter__(self) -> "Tee[T]":

asyncstdlib/itertools.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class tee(Generic[T]):
130130
def __getitem__(self, item: int) -> AsyncIterator[T]: ...
131131
@overload
132132
def __getitem__(self, item: slice) -> tuple[AsyncIterator[T], ...]: ...
133-
def __iter__(self) -> Iterator[AnyIterable[T]]: ...
133+
def __iter__(self) -> Iterator[AsyncIterator[T]]: ...
134134
async def __aenter__(self: Self) -> Self: ...
135135
async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: ...
136136
async def aclose(self) -> None: ...

0 commit comments

Comments
 (0)