We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Minimal example:
from pfun.maybe import Maybe, Just, Nothing def test_and_then() -> Maybe[int]: nope: Maybe[int] = Nothing() return nope.and_then(lambda x: Just(x + 1)) def test_map() -> Maybe[int]: nope: Maybe[int] = Nothing() return nope.map(lambda x: x + 1)
The first one results in: Cannot infer type argument 1 of "and_then" of "Nothing"
Cannot infer type argument 1 of "and_then" of "Nothing"
The second: Returning Any from function declared to return int
Returning Any from function declared to return int
The second one seems to be because it is picking up the signature of the ABC: Maybe_.map.
I am using the pfun.mypy_plugin.
pfun.mypy_plugin
Thanks for this very promising library!
The text was updated successfully, but these errors were encountered:
Thanks for the report!
The first one is likely because of limitations of type inference of lambdas in mypy itself, so not sure there is much to do there unfortunately.
I'll look into the second one, might be as you say because of the ABC. I may remove that, since it doesn't really make any sense anyway.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Minimal example:
The first one results in:
Cannot infer type argument 1 of "and_then" of "Nothing"
The second:
Returning Any from function declared to return int
The second one seems to be because it is picking up the signature of the ABC: Maybe_.map.
I am using the
pfun.mypy_plugin
.Thanks for this very promising library!
The text was updated successfully, but these errors were encountered: