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

@@ -4,15 +4,11 @@ import time
import gzip
import http.client
from typing import Any, Callable, Dict, IO, Iterable, List, Mapping, Optional, Protocol, Text, Tuple, Type, TypeVar, Union, overload
from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Protocol, Text, Tuple, Type, TypeVar, Union, overload
from typing_extensions import Literal
from types import TracebackType
from datetime import datetime
if sys.version_info >= (3, 8):
from typing import Literal
else:
from typing_extensions import Literal
_T = TypeVar("_T")
class _HasTimeTuple(Protocol):
def timetuple(self) -> time.struct_time: ...