suned / pfun

Functional, composable, asynchronous, type-safe Python.
https://pfun.dev/
MIT License
151 stars 14 forks source link

TypeError when using Effect.map with async function #117

Closed suned closed 2 years ago

suned commented 2 years ago
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>]]"