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
Using mypy 0.560 (and with the current master) and python 3.6.4, typechecking the following function:
mypy 0.560
python 3.6.4
class A: def int(self) -> int: return 5
fails with:
test.py:2: error: Invalid type "test.A.int"
In general, it looks like if I define a method with the name of a type, I can no longer use that type in return annotations in that class.
The text was updated successfully, but these errors were encountered:
I think this is a duplicate of #3775
The workaround is to use import builtins and then builtins.int.
import builtins
builtins.int
Sorry, something went wrong.
No branches or pull requests
Using
mypy 0.560
(and with the current master) andpython 3.6.4
, typechecking the following function:fails with:
In general, it looks like if I define a method with the name of a type, I can no longer use that type in return annotations in that class.
The text was updated successfully, but these errors were encountered: