-
-
Notifications
You must be signed in to change notification settings - Fork 130
Problems with overloads / mypy bug #410
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
Comments
Ok, looks like we found a bug in from returns.curry import curry
from returns.result import Result
@curry
def first(a: int, b: int) -> int:
...
reveal_type(
Result.from_value(first),
)
# Revealed type is 'returns.result.Result[Overload(def (a: builtins.int) -> def (b: builtins.int) -> builtins.int, def (a: builtins.int, b: builtins.int) -> builtins.int), Any]' But, this does not: from returns.curry import curry
from returns.result import Result
@curry
def first(a: int, b: int, c: int) -> int:
...
reveal_type(
Result.from_value(first),
) Output:
Can you please create a new bug in mypy's issue tracker? |
Minimal reproduction: https://github.com/sobolevn/mypy-bug-410 |
Sorry, I haven't seen python/mypy#8978 |
This is for a 3rd party plugin: dry-python/returns#410 - Closes #9147 - Closes #8978
Waiting for your changes to be released and finally close this issue!! |
I'm having some errors with typing, if it's not a
returns
problem feel free to close this issueMypy errors:
All the errors above are from my return statement in GetStreamDetailsUsecase.__call__!
Code:
But if I change the flow to handmade flow just one error appeared:
Mypy error:
Code:
The text was updated successfully, but these errors were encountered: