mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 03:11:16 +08:00
Update typing_extensions imports in stdlib (#11244)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
@@ -3,8 +3,8 @@ import sys
|
||||
import types
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Iterable
|
||||
from typing import Any
|
||||
from typing_extensions import Self, SupportsIndex, TypeAlias
|
||||
from typing import Any, SupportsIndex
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = ["Client", "Listener", "Pipe", "wait"]
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ from multiprocessing.managers import SyncManager
|
||||
from multiprocessing.pool import Pool as _Pool
|
||||
from multiprocessing.process import BaseProcess
|
||||
from multiprocessing.sharedctypes import SynchronizedArray, SynchronizedBase
|
||||
from typing import Any, ClassVar, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Any, ClassVar, Literal, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
if sys.platform != "win32":
|
||||
from multiprocessing.connection import Connection
|
||||
|
||||
@@ -12,8 +12,7 @@ from threading import (
|
||||
RLock as RLock,
|
||||
Semaphore as Semaphore,
|
||||
)
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, Literal
|
||||
|
||||
from .connection import Pipe as Pipe
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import threading
|
||||
from _typeshed import SupportsKeysAndGetItem, SupportsRichComparison, SupportsRichComparisonT
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping, MutableSequence, Sequence
|
||||
from types import TracebackType
|
||||
from typing import Any, AnyStr, ClassVar, Generic, TypeVar, overload
|
||||
from typing_extensions import Self, SupportsIndex, TypeAlias
|
||||
from typing import Any, AnyStr, ClassVar, Generic, SupportsIndex, TypeVar, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from .connection import Connection
|
||||
from .context import BaseContext
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from types import TracebackType
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Any, Generic, Literal, TypeVar
|
||||
from typing_extensions import Self
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -8,8 +8,7 @@ from copyreg import _DispatchTableType
|
||||
from multiprocessing import connection
|
||||
from pickle import _ReducedType
|
||||
from socket import socket
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, Literal
|
||||
|
||||
if sys.platform == "win32":
|
||||
__all__ = ["send_handle", "recv_handle", "ForkingPickler", "register", "dump", "DupHandle", "duplicate", "steal_handle"]
|
||||
|
||||
@@ -4,8 +4,7 @@ from ctypes import _CData, _SimpleCData, c_char
|
||||
from multiprocessing.context import BaseContext
|
||||
from multiprocessing.synchronize import _LockLike
|
||||
from types import TracebackType
|
||||
from typing import Any, Generic, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, Generic, Literal, Protocol, TypeVar, overload
|
||||
|
||||
__all__ = ["RawValue", "RawArray", "Value", "Array", "copy", "synchronized"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user