diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index f4e0e0ffef39..a2f56988bba2 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -98,6 +98,7 @@ _P = ParamSpec("_P") _StartT = TypeVar("_StartT", covariant=True, default=Any) _StopT = TypeVar("_StopT", covariant=True, default=Any) _StepT = TypeVar("_StepT", covariant=True, default=Any) +_TypeT_co = TypeVar("_TypeT_co", default=Any, covariant=True) class object: __doc__: str | None @@ -167,7 +168,7 @@ class classmethod(Generic[_T, _P, _R_co]): @property def __wrapped__(self) -> Callable[Concatenate[type[_T], _P], _R_co]: ... -class type: +class type(Generic[_TypeT_co]): # object.__base__ is None. Otherwise, it would be a type. @property def __base__(self) -> type | None: ...