Skip to content

Commit a92da58

Browse files
authored
Add @type_check_only to two fictional classes in builtins.pyi (#8531)
1 parent 556f6a1 commit a92da58

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/builtins.pyi

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ from typing import ( # noqa: Y027
5353
SupportsRound,
5454
TypeVar,
5555
overload,
56+
type_check_only,
5657
)
5758
from typing_extensions import Literal, LiteralString, SupportsIndex, TypeAlias, TypeGuard, final
5859

@@ -938,6 +939,7 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
938939

939940
# Doesn't exist at runtime, but deleting this breaks mypy. See #2999
940941
@final
942+
@type_check_only
941943
class function:
942944
# Make sure this class definition stays roughly in line with `types.FunctionType`
943945
@property
@@ -1773,6 +1775,7 @@ def __build_class__(__func: Callable[[], _Cell | Any], __name: str, *bases: Any,
17731775
# Actually the type of Ellipsis is <type 'ellipsis'>, but since it's
17741776
# not exposed anywhere under that name, we make it private here.
17751777
@final
1778+
@type_check_only
17761779
class ellipsis: ...
17771780

17781781
Ellipsis: ellipsis

0 commit comments

Comments
 (0)