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
Bug Report
Mypy reports an error where it shouldn't. Sample code included below.
To Reproduce
from typing import Literal, Union def test() -> Union[tuple[Literal[1], str], tuple[Literal[2], int]]: return 1, ""
Expected Behavior
The code should successfully type-check.
Actual Behavior
Mypy does not successfully type check the code, reporting:
error: Incompatible return value type (got "Tuple[int, str]", expected "Union[Tuple[Literal[1], str], Tuple[Literal[2], int]]")
Your Environment
mypy.ini
The text was updated successfully, but these errors were encountered:
Please, check if https://github.com/python/mypy/pull/11236/files solves your issue!
Sorry, something went wrong.
@sobolevn It does! Thanks, closing this.
No branches or pull requests
Bug Report
Mypy reports an error where it shouldn't. Sample code included below.
To Reproduce
Expected Behavior
The code should successfully type-check.
Actual Behavior
Mypy does not successfully type check the code, reporting:
Your Environment
mypy.ini
(and other config files): none (defaults)The text was updated successfully, but these errors were encountered: