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 following code:
class A: pass a = A() if hasattr(a, 'v'): print(a.v) print("OK")
produces the following ouput:
$ python3 test.py OK $ mypy test.py test.py:7:11: error: "A" has no attribute "v" [attr-defined] print(a.v) ^ Found 1 error in 1 file (checked 1 source file) $ mypy --version mypy 0.910 $ python3 --version Python 3.8.10 $ cat /etc/issue Ubuntu 20.04.3 LTS \n \l $ uname -a Linux ubuntu 5.4.0-88-generic #99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
Duplicate of #1424
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
The following code:
produces the following ouput:
The text was updated successfully, but these errors were encountered: