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

Add curried overload to Curry.__call__ type #80

Closed
suned opened this issue Jun 14, 2021 · 0 comments
Closed

Add curried overload to Curry.__call__ type #80

suned opened this issue Jun 14, 2021 · 0 comments
Labels
enhancement New feature or request MyPy

Comments

@suned
Copy link
Owner

suned commented Jun 14, 2021

The current implementation of the type analyzer for Curry types and curry calls only adds the uncurried function type as the type of __call__. This means that the following call produces a false negative:

f: Curry[Callable[[int, int], int]]
g: Callable[[Callable[[int], Callable[[int], int]]], int]

g(f)

As a first solution I suggest to add an overloaded signature to Curry.__call__ that is curried in the required arguments only

@suned suned added enhancement New feature or request MyPy labels Jun 14, 2021
@suned suned closed this as completed Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request MyPy
Projects
None yet
Development

No branches or pull requests

1 participant