suned / pfun

Functional, composable, asynchronous, type-safe Python.

Home Page:https://pfun.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError when using Effect.map with async function

suned opened this issue · comments

from pfun import Success


async def f(s: str) -> int: ...

e: Success[str]
e.map(f)  # error: Argument 1 to "map" of "Effect" has incompatible type "Callable[[str], Coroutine[Any, Any, int]]"; expected "Callable[[str], Awaitable[<nothing>]]"