Skip to content

Add TypeGuard (PEP 647 draft) #4879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stdlib/3/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ if sys.version_info >= (3, 10):
def __init__(self, name: str) -> None: ...
Concatenate: _SpecialForm = ...
TypeAlias: _SpecialForm = ...
TypeGuard: _SpecialForm = ...

# Return type that indicates a function does not return.
# This type is equivalent to the None type, but the no-op Union is necessary to
Expand Down
3 changes: 3 additions & 0 deletions third_party/2and3/typing_extensions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,6 @@ else:
__name__: str
def __init__(self, name: str) -> None: ...
Concatenate: _SpecialForm = ...

# PEP 647
TypeGuard: _SpecialForm = ...