Skip to content

Commit dcaea8b

Browse files
authored
Add TypeGuard (PEP 647 draft) (#4879)
1 parent 91582e6 commit dcaea8b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

stdlib/3/typing.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ if sys.version_info >= (3, 10):
6161
def __init__(self, name: str) -> None: ...
6262
Concatenate: _SpecialForm = ...
6363
TypeAlias: _SpecialForm = ...
64+
TypeGuard: _SpecialForm = ...
6465

6566
# Return type that indicates a function does not return.
6667
# This type is equivalent to the None type, but the no-op Union is necessary to

third_party/2and3/typing_extensions.pyi

+3
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,6 @@ else:
112112
__name__: str
113113
def __init__(self, name: str) -> None: ...
114114
Concatenate: _SpecialForm = ...
115+
116+
# PEP 647
117+
TypeGuard: _SpecialForm = ...

0 commit comments

Comments
 (0)