The typing specs require that a float typed argument also accept int values, and that a complex type argument accept both int and complex values. That implies that, if we have a val typed complex, and isinstance(val, complex) returns false, it can still be an int or float. So,
def test(x: float):
if not isinstance(x, float):
reveal_type(x) # Should reveal int
and,
def test(x: complex):
if not isinstance(x, complex):
reveal_type(x) # Should reveal int | float (or possibly just float)
But they actually get treated as unreachable code and don't reveal anything.