mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 22:56:55 +08:00
Literal: always import from typing_extensions for simplicity (#4219)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user