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
Code like this currently fails but should be okay:
def f(x: Union[int, str]) -> None: if not isinstance(x, int): return x + 2 # x must be int here so this is okay, but mypy complains
Note that this works currently (without the not operator):
not
def f(x: Union[int, str]) -> None: if isinstance(x, str): return x + 2 # this is considered valid, as it should be
The text was updated successfully, but these errors were encountered:
Fixed as part of #896 (thanks @jhance!).
Sorry, something went wrong.
No branches or pull requests
Code like this currently fails but should be okay:
Note that this works currently (without the
not
operator):The text was updated successfully, but these errors were encountered: