We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Union[X, NoReturn]
X
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
from typing import Union, NoReturn def func() -> Union[str, NoReturn]: return 'test' func().lower()
Here, Unoin[str, NoReturn] should effectively be treated as the same as str. But mypy doesn't seem to do that.
Unoin[str, NoReturn]
str
$ mypy code.py code.py:6: error: Item "NoReturn" of "Union[str, NoReturn]" has no attribute "lower" Found 1 error in 1 file (checked 1 source file)
More information in this discussion page: python/typing#994 (comment)
The text was updated successfully, but these errors were encountered:
This appears to be fixed as of Mypy 0.940.
Sorry, something went wrong.
Thanks, this was fixed in #11996
No branches or pull requests
Here,
Unoin[str, NoReturn]
should effectively be treated as the same asstr
. But mypy doesn't seem to do that.More information in this discussion page: python/typing#994 (comment)
The text was updated successfully, but these errors were encountered: