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

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

No files matched your search

+2 -6
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: ...