-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumps the version of
typing_extensions
to include Self
Type
- Loading branch information
konichuvak
committed
Jun 18, 2023
1 parent
f3834ef
commit 5c6c657
Showing
2 changed files
with
8 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
import sys | ||
# Changelog for `typing_extensions` for checking which types were added when | ||
# https://github.com/python/typing_extensions/blob/main/CHANGELOG.md | ||
|
||
# remove once web3 supports python>=3.8 | ||
# Types was added to typing in 3.8 | ||
if sys.version_info >= (3, 8): | ||
from typing import ( | ||
Literal, | ||
Protocol, | ||
TypedDict, | ||
) | ||
else: | ||
from typing_extensions import ( # noqa: F401 | ||
Literal, | ||
Protocol, | ||
TypedDict, | ||
) | ||
# Note that we do not need to explicitly check for python version here, | ||
# because `typing_extensions` will do it for us and either import from `typing` | ||
# or use the back-ported version of the type. | ||
|
||
from typing_extensions import Literal, Protocol, TypedDict, Self |