We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
The inferred type of f(a) below is int. It would be better to infer Any, since the correct type can't be predicted due to the Any argument type:
f(a)
int
Any
from typing import overload, Any @overload def f(x: int) -> int: ... @overload def f(x: object) -> object: ... def f(x): pass a: Any reveal_type(f(a)) # int (but should be Any)
This blocks PR #3300 from being merged, since the PR will expose additional cases where a too precise type is inferred.
The text was updated successfully, but these errors were encountered:
Isn't this just a duplicate of #3662?
Sorry, something went wrong.
Oops, this a dupe (though the example is slightly different).
No branches or pull requests
The inferred type of
f(a)
below isint
. It would be better to inferAny
, since the correct type can't be predicted due to theAny
argument type:This blocks PR #3300 from being merged, since the PR will expose additional cases where a too precise type is inferred.
The text was updated successfully, but these errors were encountered: