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
Please provide more information to help us understand the issue:
Are you reporting a bug, or opening a feature request? Reporting a bug
Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
importnumbersa: float=5.0print(isinstance(a, numbers.Number)) # Truedeff(a: float) ->numbers.Number:
returna# Incompatible return value type (got "float", expected "Number")
What is the actual behavior/output?
Mypy reports the error "Incompatible return value type (got "float", expected "Number")".
What is the behavior/output you expect?
I expect mypy to report no errors.
What are the versions of mypy and Python you are using?
mypy 0.660
Python 3.6.8
Do you see the same issue after installing mypy from Git master?
Yes.
What are the mypy flags you are using? (For example --strict-optional)
None.
I'm slightly unclear if this is really a bug because I don't really understand what numbers is doing but isinstance() returns true, so I would expect the above code to be fine.
Thanks!
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Please provide more information to help us understand the issue:
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
Mypy reports the error "Incompatible return value type (got "float", expected "Number")".
I expect mypy to report no errors.
mypy 0.660
Python 3.6.8
Do you see the same issue after installing mypy from Git master?
Yes.
None.
I'm slightly unclear if this is really a bug because I don't really understand what numbers is doing but isinstance() returns true, so I would expect the above code to be fine.
Thanks!
The text was updated successfully, but these errors were encountered: