diff --git a/stdlib/2/typing.pyi b/stdlib/2/typing.pyi index 0fef6d4a1..747bfa4e9 100644 --- a/stdlib/2/typing.pyi +++ b/stdlib/2/typing.pyi @@ -9,13 +9,17 @@ from types import CodeType, FrameType, TracebackType overload = object() Any = object() TypeVar = object() -Generic = object() -Tuple = object() -Callable = object() -Type = object() _promote = object() no_type_check = object() -ClassVar = object() + +class _SpecialForm(object): + def __getitem__(self, typeargs: Any) -> object: ... + +Tuple: _SpecialForm = ... +Generic: _SpecialForm = ... +Callable: _SpecialForm = ... +Type: _SpecialForm = ... +ClassVar: _SpecialForm = ... class GenericMeta(type): ... diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index d0753ef85..c211591aa 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -10,13 +10,17 @@ from types import CodeType, FrameType, TracebackType overload = object() Any = object() TypeVar = object() -Generic = object() -Tuple = object() -Callable = object() -Type = object() _promote = object() no_type_check = object() -ClassVar = object() + +class _SpecialForm: + def __getitem__(self, typeargs: Any) -> Any: ... + +Tuple: _SpecialForm = ... +Generic: _SpecialForm = ... +Callable: _SpecialForm = ... +Type: _SpecialForm = ... +ClassVar: _SpecialForm = ... class GenericMeta(type): ...