Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions asyncstdlib/asynctools.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class _BorrowedAsyncIterator(AsyncGenerator[T, S]):
__slots__ = "__wrapped__", "__anext__", "asend", "athrow", "_wrapper"

# Type checker does not understand `__slot__` definitions
__anext__: Callable[[Any], Coroutine[Any, Any, T]]
__anext__: Callable[..., Coroutine[Any, Any, T]]
asend: Any
athrow: Any

Expand All @@ -49,7 +49,7 @@ def __init__(self, iterator: Union[AsyncIterator[T], AsyncGenerator[T, S]]):
# An async *iterator* (e.g. `async def: yield`) must return
# itself from __aiter__. If we do not shadow this then
# running aiter(self).aclose closes the underlying iterator.
self.__anext__ = self._wrapper.__anext__ # type: ignore
self.__anext__ = self._wrapper.__anext__
if hasattr(iterator, "asend"):
self.asend = (
iterator.asend # pyright: ignore[reportUnknownMemberType,reportAttributeAccessIssue]
Expand Down