Skip to content

Commit

Permalink
AsyncIterator --> AsyncIterable
Browse files Browse the repository at this point in the history
  • Loading branch information
kramstrom committed Dec 3, 2024
1 parent 4019afe commit 55a5da6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modal/_utils/async_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import itertools
import time
import typing
from collections.abc import AsyncGenerator, AsyncIterator, Awaitable, Iterable, Iterator
from collections.abc import AsyncGenerator, AsyncIterable, Awaitable, Iterable, Iterator
from contextlib import asynccontextmanager
from dataclasses import dataclass
from typing import (
Expand Down Expand Up @@ -484,7 +484,7 @@ async def __aexit__(self, exc, exc_type, tb):
await self.agen.aclose()


async def sync_or_async_iter(iter: Union[Iterable[T], AsyncIterator[T]]) -> AsyncGenerator[T, None]:
async def sync_or_async_iter(iter: Union[Iterable[T], AsyncIterable[T]]) -> AsyncGenerator[T, None]:
if hasattr(iter, "__aiter__"):
agen = typing.cast(AsyncGenerator[T, None], iter)
try:
Expand Down

0 comments on commit 55a5da6

Please sign in to comment.