Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curry plugin fails with generic function argument #35

Closed
suned opened this issue Nov 25, 2019 · 0 comments · Fixed by #56
Closed

curry plugin fails with generic function argument #35

suned opened this issue Nov 25, 2019 · 0 comments · Fixed by #56
Labels
bug Something isn't working MyPy

Comments

@suned
Copy link
Owner

suned commented Nov 25, 2019

from typing import Callable, TypeVar, Union
from pfun import curry

A = TypeVar('A')
B = TypeVar('B')


@curry
def f(v: B, g: Callable[[], A]) -> Union[B, A]:
    pass


f(1)(lambda: '')   # Argument 1 has incompatible type "Callable[[], str]"
@suned suned added bug Something isn't working MyPy labels Nov 25, 2019
@suned suned mentioned this issue Aug 8, 2020
@suned suned closed this as completed in #56 Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MyPy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant