From 9308fa17ce7c620386046a32bc2e233df8f37aa3 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:34:02 -0400 Subject: [PATCH] chore: return iterator directly (#393) --- a_sync/iter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_sync/iter.py b/a_sync/iter.py index 114bf024..c6eed0a7 100644 --- a/a_sync/iter.py +++ b/a_sync/iter.py @@ -302,14 +302,14 @@ def __init__(self, async_iterator: AsyncIterator[T]): self.__wrapped__ = async_iterator "The wrapped :class:`AsyncIterator`." - async def __anext__(self) -> T: + def __anext__(self) -> Coroutine[Any, Any, T]: """ Asynchronously fetch the next item from the {cls}. Raises: :class:`StopAsyncIteration`: Once all items have been fetched from the {cls}. """ - return await self.__wrapped__.__anext__() + return self.__wrapped__.__anext__() def __iter__(self) -> Self: """