We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
isinstance
None
value: str | bool | None assert not isinstance(value, str | None) reveal_type(value) # str | bool | None
value: object assert isinstance(value, str | None) reveal_type(value) # object
The text was updated successfully, but these errors were encountered:
Fix isinstance checks with PEP 604 unions containing None
828a115
Fixes python#17413
Thanks for the issue, looks pretty easy to fix
Sorry, something went wrong.
de4e9d6
isinstance(foo, SomeType | None)
isinstance(foo, SomeType | type(None))
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: