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
In the following example, the last revealed type could/should be Union[builtins.int, None]:
Union[builtins.int, None]
def f() -> bool: return True u: int | tuple[int] x = None if f(): x = u if isinstance(x, tuple): x = x[0] reveal_type(x) # note: "builtins.int" reveal_type(x) # note: Revealed type is "Union[builtins.int, Tuple[builtins.int], None]"
See this comment for background information.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the following example, the last revealed type could/should be
Union[builtins.int, None]
:See this comment for background information.
The text was updated successfully, but these errors were encountered: