-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Error to infer types from a curried function with more than two args #8978
Comments
Can you post a self-contained example? There is a known very old bug that generic functions when passed as arguments to another generic functions don't work. |
Oups! I have posted a duplicate: #9017 |
This looks like a bug, though it might plausibly be an issue with the returns plugin. Using a complex overloaded function as a type variable doesn't seem to work in the example, even though it isn't generic. |
Oups, I forgot about this issue. I was able to find a hacky solution here: #9147 |
This is for a 3rd party plugin: dry-python/returns#410 - Closes #9147 - Closes #8978
This is possibly a BUG
I'm using returns lib that provide fully typed functions, it has a curry decorator. I'm trying to use it, but
mypy
has got an error when we have a curried function with more than two args and try to create a Result container with the function.Result.from_value(...) source code
@curry source code
Working example:
Nonworking example:
mypy output:
Versions
My config file:
Refs: dry-python/returns#410
The text was updated successfully, but these errors were encountered: