Skip to content

Commit

Permalink
types.EllipsisType was added in Python 3.10 (#10719)
Browse files Browse the repository at this point in the history
  • Loading branch information
randolf-scholz authored Sep 16, 2023
1 parent d88205c commit 6bf2394
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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 <type 'ellipsis'>, 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 <type 'ellipsis'>, but since it's
# not exposed anywhere under that name, we make it private here.
@final
@type_check_only
class ellipsis: ...

Ellipsis: ellipsis

Expand Down

0 comments on commit 6bf2394

Please sign in to comment.