def f(x: Union[int, str, List, Tuple]) -> None: if isinstance(x, (str, (int, tuple))): print(x[1]) results in error: Argument 2 to "isinstance" has incompatible type ...
When using list comprehension in a method, variables assigned inside the comprehension is listed twice in the symbol list / outline view. Same happens when isinstance method is used inside a method.