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
Given
x = None if x is not None: x.foo()
running mypy file.py reports:
mypy file.py
file.py:3: error: "None" has no attribute "foo"
mypy version: mypy 0.570-dev-8ec7046787f92bf7b00d0c70f570fcb5d75e4b53
mypy 0.570-dev-8ec7046787f92bf7b00d0c70f570fcb5d75e4b53
Passing --strict-optional makes the problem go away.
--strict-optional
The text was updated successfully, but these errors were encountered:
seems like this is related: #4520
Sorry, something went wrong.
I think this is in fact a duplicate of #4520, closing this as that issue has more discussion.
No branches or pull requests
Given
running
mypy file.py
reports:mypy version:
mypy 0.570-dev-8ec7046787f92bf7b00d0c70f570fcb5d75e4b53
Passing
--strict-optional
makes the problem go away.The text was updated successfully, but these errors were encountered: