You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So why (-2) ** 0.5 should be of type float? And if this is the reason, why it can't simply say the return type is complex instead (which would easily tell the user what are the considerations)?
Personally I think the best user experience is for it to be simply a float, but it is just a preference.
Bug Report
A regression: in the current version of mypy, float exponential results in typing.Any. For int exponential it works, only float exponential fails.
(A clear and concise description of what the bug is.)
To Reproduce
$ cat test.py
reveal_type(2.0 ** 1.0)
Expected Behavior
It should say that the revealed type is builtins.float when run.
Actual Behavior
$ mypy test.py
test.py:1: note: Revealed type is "Any"
Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: