cpython/Lib/test/typinganndata/ann_module9.py
Anh71me d5fea01d9d
GH-96073: Fix wild replacement in inspect.formatannotation (#96074)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-10-07 11:23:06 -07:00

14 lines
280 B
Python

# Test ``inspect.formatannotation``
# https://github.com/python/cpython/issues/96073
from typing import Union, List
ann = Union[List[str], int]
# mock typing._type_repr behaviour
class A: ...
A.__module__ = 'testModule.typing'
A.__qualname__ = 'A'
ann1 = Union[List[A], int]