Skip to content

Commit

Permalink
fix: broken import
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Feb 11, 2024
1 parent 168a6ca commit 7c31918
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion a_sync/utils/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

from a_sync._typing import K, P, V, AnyIterable
from a_sync.iter import ASyncIterator
from a_sync.task import TaskMapping


@overload
def map(coro_fn: Callable[P, Awaitable[V]], *iterables: AnyIterable[P.args], yields: Literal['keys'], **coro_fn_kwargs: P.kwargs) -> ASyncIterator[K]:...
@overload
def map(coro_fn: Callable[P, Awaitable[V]], *iterables: AnyIterable[P.args], yields: Literal['both'], **coro_fn_kwargs: P.kwargs) -> ASyncIterator[Tuple[K, V]]:...
def map(coro_fn: Callable[P, Awaitable[V]], *iterables: AnyIterable[P.args], yields: Literal['keys', 'both'] = 'both', **coro_fn_kwargs: P.kwargs) -> Union[ASyncIterator[K], ASyncIterator[Tuple[K, V]]]:
from a_sync.task import TaskMapping
return ASyncIterator.wrap(TaskMapping(coro_fn, **coro_fn_kwargs).map(*iterables, yields=yields))

0 comments on commit 7c31918

Please sign in to comment.