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
import glob from typing import Callable, List def fun1(b: str) -> List[str]: return ["a", "b"] + [b] def fun(a: str) -> Callable: return fun1 if a == "hello" else glob.glob
Running mypy (v 0.931) on this file gives:
error: Incompatible return value type (got "function", expected "Callable[..., Any]") [return-value]
Crossposting from stackoverflow where an answer suggests that this problem is limited to using the ternary operator, but a bug nevertheless.
The text was updated successfully, but these errors were encountered:
This can be added to the increasingly long list of issues caused by mypy's use of join rather than union. See #12009.
Sorry, something went wrong.
I'm closing this as a duplicate of #10740, as it's nearly exactly the same behaviour on display
No branches or pull requests
Running mypy (v 0.931) on this file gives:
Crossposting from stackoverflow where an answer suggests that this problem is limited to using the ternary operator, but a bug nevertheless.
The text was updated successfully, but these errors were encountered: