Skip to content

Commit

Permalink
chore: return iterator directly (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Nov 18, 2024
1 parent de954df commit 9308fa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions a_sync/iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down

0 comments on commit 9308fa1

Please sign in to comment.