Running mypy (0.550) on the following code:
from typing import overload, Tuple, Any
class A: ...
class B: ...
class C: ...
class D: ...
@overload
def f(x: A) -> B: ...
@overload
def f(x: Tuple[C]) -> D: ...
def f(x: Any) -> Any:...
reports:
error: Overloaded function signatures 1 and 2 overlap with incompatible return types
I've tried a couple different types for the second overload and so far the error only seems to occur with Tuple[...] arguments. For instance, I don't see the issue if I substitute def f(x:List[C]) -> D: ... as the 2nd overload.