Literal: always import from typing_extensions for simplicity (#4219)

This commit is contained in:
Jelle Zijlstra
2020-06-10 21:23:58 -07:00
committed by GitHub
parent 43e93f803f
commit 44a852dff5
22 changed files with 31 additions and 139 deletions

View File

@@ -16,11 +16,7 @@ CPython C source: https://github.com/python/cpython/blob/master/Modules/socketmo
# adapted for Python 2.7 by Michal Pokorny
import sys
from typing import Any, BinaryIO, Iterable, List, Optional, Text, TextIO, Tuple, TypeVar, Union, overload
if sys.version_info >= (3, 8):
from typing import Literal
else:
from typing_extensions import Literal
from typing_extensions import Literal
# ----- Constants -----