mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-27 22:31:12 +08:00
Update typing_extensions imports in stdlib (#11244)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
@@ -6,8 +6,7 @@ from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import Iterator, Mapping, Sequence
|
||||
from importlib.machinery import ModuleSpec
|
||||
from io import BufferedReader
|
||||
from typing import IO, Any, Protocol, overload, runtime_checkable
|
||||
from typing_extensions import Literal
|
||||
from typing import IO, Any, Literal, Protocol, overload, runtime_checkable
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = [
|
||||
|
||||
@@ -4,8 +4,8 @@ import types
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable, Iterable, MutableSequence, Sequence
|
||||
from importlib.metadata import DistributionFinder, PathDistribution
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, deprecated
|
||||
from typing import Any, Literal
|
||||
from typing_extensions import deprecated
|
||||
|
||||
class ModuleSpec:
|
||||
def __init__(
|
||||
|
||||
@@ -8,8 +8,8 @@ import zipfile
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from collections.abc import Iterable, Iterator
|
||||
from io import BufferedReader
|
||||
from typing import NoReturn, TypeVar
|
||||
from typing_extensions import Literal, Never
|
||||
from typing import Literal, NoReturn, TypeVar
|
||||
from typing_extensions import Never
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import importlib.resources.abc as abc
|
||||
|
||||
@@ -3,8 +3,8 @@ import sys
|
||||
from _typeshed import Incomplete, OpenBinaryMode, OpenTextMode, Unused
|
||||
from collections.abc import Iterator
|
||||
from io import TextIOWrapper
|
||||
from typing import IO, Any, BinaryIO, NoReturn, overload
|
||||
from typing_extensions import Literal, Never
|
||||
from typing import IO, Any, BinaryIO, Literal, NoReturn, overload
|
||||
from typing_extensions import Never
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from .abc import Traversable, TraversableResources
|
||||
|
||||
Reference in New Issue
Block a user