basedmypy
basedmypy copied to clipboard
type-guards that include `Any` don't narrow properly
def g(x: object) -> "x is list[Any]":
return True
async def f(t: list[int] | int):
if g(t):
return
reveal_type(t) # list[int] | int, expected int