mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-24 18:48:46 +08:00
Update typing_extensions imports in third-party stubs (#11245)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
from _typeshed import FileDescriptor, StrOrBytesPath
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Literal, Self, TypeVarTuple, Unpack
|
||||
from typing import Any, Literal, overload
|
||||
from typing_extensions import Self, TypeVarTuple, Unpack
|
||||
|
||||
from gevent._types import _Loop, _StatResult
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ from _typeshed import (
|
||||
ReadableBuffer,
|
||||
)
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, AnyStr, ClassVar, Generic, TypeVar, overload
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import IO, Any, AnyStr, ClassVar, Generic, Literal, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from gevent.lock import DummySemaphore, Semaphore
|
||||
from gevent.threadpool import ThreadPool
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import Any
|
||||
from typing_extensions import final
|
||||
from typing import Any, final
|
||||
from weakref import ref
|
||||
|
||||
@final
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from _typeshed import FileDescriptor, StrOrBytesPath
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import Any, Protocol, overload
|
||||
from typing_extensions import Literal, TypeAlias, TypeVarTuple, Unpack
|
||||
from typing import Any, Literal, Protocol, overload
|
||||
from typing_extensions import TypeAlias, TypeVarTuple, Unpack
|
||||
|
||||
_Ts = TypeVarTuple("_Ts")
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from types import TracebackType
|
||||
from typing import Generic, TypeVar, overload
|
||||
from typing_extensions import TypeAlias, final
|
||||
from typing import Generic, TypeVar, final, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from gevent.event import _ValueSource
|
||||
from gevent.hub import Hub
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from collections.abc import Callable, Container
|
||||
from types import TracebackType
|
||||
from typing import Any, Generic, Protocol
|
||||
from typing_extensions import Literal, ParamSpec, Self, TypeAlias
|
||||
from typing import Any, Generic, Literal, Protocol
|
||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||
|
||||
from gevent._types import _Loop
|
||||
from gevent.pool import Pool
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from types import TracebackType
|
||||
from typing import Generic, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing import Generic, Literal, Protocol, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from gevent._abstract_linkable import AbstractLinkable
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@ if sys.platform != "win32":
|
||||
OpenBinaryModeWriting,
|
||||
OpenTextMode,
|
||||
)
|
||||
from typing import IO, AnyStr, overload
|
||||
from typing_extensions import Literal
|
||||
from typing import IO, AnyStr, Literal, overload
|
||||
|
||||
from gevent._fileobjectcommon import _IOT, FileObjectBase
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, Literal
|
||||
|
||||
from gevent._abstract_linkable import AbstractLinkable
|
||||
from gevent.hub import Hub
|
||||
|
||||
@@ -2,7 +2,7 @@ import os
|
||||
import sys
|
||||
from _typeshed import FileDescriptor, Incomplete, ReadableBuffer
|
||||
from collections.abc import Callable
|
||||
from typing_extensions import Literal
|
||||
from typing import Literal
|
||||
|
||||
def tp_read(fd: FileDescriptor, n: int) -> bytes: ...
|
||||
def tp_write(fd: FileDescriptor, buf: ReadableBuffer) -> int: ...
|
||||
|
||||
@@ -5,8 +5,8 @@ from http.client import HTTPMessage
|
||||
from io import BufferedIOBase, BufferedReader
|
||||
from logging import Logger
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, Self
|
||||
from typing import Any, ClassVar, Literal, Protocol, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from gevent.baseserver import _Spawner
|
||||
from gevent.server import StreamServer
|
||||
|
||||
@@ -3,8 +3,8 @@ from collections.abc import Iterable
|
||||
|
||||
# technically it is using _PySimpleQueue, which has the same interface as SimpleQueue
|
||||
from queue import Empty as Empty, Full as Full, SimpleQueue as SimpleQueue
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import Literal, Self, final
|
||||
from typing import Any, Generic, Literal, TypeVar, final, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from gevent._waiter import Waiter
|
||||
from gevent.hub import Hub
|
||||
|
||||
@@ -2,7 +2,7 @@ import sys
|
||||
|
||||
if sys.platform != "win32":
|
||||
from collections.abc import Sequence
|
||||
from typing_extensions import TypedDict
|
||||
from typing import TypedDict
|
||||
|
||||
from gevent._types import _Watcher
|
||||
from gevent.hub import Hub
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from _socket import _Address as _StrictAddress
|
||||
from _typeshed import ReadableBuffer, StrOrBytesPath
|
||||
from collections.abc import Callable
|
||||
from typing import Any, ClassVar, overload
|
||||
from typing_extensions import TypeAlias, TypedDict
|
||||
from typing import Any, ClassVar, TypedDict, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from gevent.baseserver import BaseServer, _Spawner
|
||||
from gevent.socket import socket as _GeventSocket
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Literal, ParamSpec, Self
|
||||
from typing import Any, Literal, TypeVar, overload
|
||||
from typing_extensions import ParamSpec, Self
|
||||
|
||||
from gevent._types import _TimerWatcher
|
||||
|
||||
|
||||
Reference in New Issue
Block a user