test inspect formatannotation https github compythoncpythonissues96073 mock typing typerepr behaviour test inspect formatannotation https github com python cpython issues 96073 mock typing _type_repr behaviour
from typing import Union, List

ann = Union[List[str], int]


class A: ...

A.__module__ = 'testModule.typing'
A.__qualname__ = 'A'

ann1 = Union[List[A], int]