Update typing_extensions imports in third-party stubs (#11245)

This commit is contained in:
Sebastian Rittau
2024-01-05 15:40:13 +01:00
committed by GitHub
parent 1b471a9a0a
commit b6eaadcfe5
488 changed files with 715 additions and 845 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1,5 +1,4 @@
from typing import Any
from typing_extensions import final
from typing import Any, final
from weakref import ref
@final

View File

@@ -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")

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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: ...

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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