Bug Report
The following code produces an unexpected error
def foo() -> Tuple[Optional[int], Optional[Real]]:
x: int = 5
return (x, x) # Incompatible return value type (got "Tuple[int, int]", expected "Tuple[Optional[int], Optional[Real]]")
To Reproduce
Run mypy on the above
Expected Behavior
No error
Actual Behavior
The following error is produced
Incompatible return value type (got "Tuple[int, int]", expected "Tuple[Optional[int], Optional[Real]]")
Your Environment
- Mypy version used: 0.800
- Python version used: 3.8
- Operating system and version: Ubuntu 18.04.5 LTS
Bug Report
The following code produces an unexpected error
To Reproduce
Run mypy on the above
Expected Behavior
No error
Actual Behavior
The following error is produced
Incompatible return value type (got "Tuple[int, int]", expected "Tuple[Optional[int], Optional[Real]]")
Your Environment