diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index cf4f857c5..9a1534005 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1905,11 +1905,17 @@ def __import__( ) -> types.ModuleType: ... def __build_class__(__func: Callable[[], _Cell | Any], __name: str, *bases: Any, metaclass: Any = ..., **kwds: Any) -> Any: ... -# Actually the type of Ellipsis is , but since it's -# not exposed anywhere under that name, we make it private here. -@final -@type_check_only -class ellipsis: ... +if sys.version_info >= (3, 10): + # In Python 3.10, EllipsisType is exposed publicly in the types module. + @final + class ellipsis: ... + +else: + # Actually the type of Ellipsis is , but since it's + # not exposed anywhere under that name, we make it private here. + @final + @type_check_only + class ellipsis: ... Ellipsis: ellipsis