basedmypy
basedmypy copied to clipboard
enforce parenthesis on ambigious types
def guard(x: object, y: object) -> a is int & b is str if True else a is str & b is int: ...
The tricky part is that ast removes parens...