mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
Remove several unused TypeVars (#6829)
This commit is contained in:
@@ -2,7 +2,7 @@ import _compression
|
||||
import sys
|
||||
from _compression import BaseStream
|
||||
from _typeshed import ReadableBuffer, Self, StrOrBytesPath, WriteableBuffer
|
||||
from typing import IO, Any, Iterable, Protocol, TextIO, TypeVar, overload
|
||||
from typing import IO, Any, Iterable, Protocol, TextIO, overload
|
||||
from typing_extensions import Literal, SupportsIndex, final
|
||||
|
||||
# The following attributes and methods are optional:
|
||||
@@ -16,8 +16,6 @@ class _WritableFileobj(Protocol):
|
||||
# def fileno(self) -> int: ...
|
||||
# def close(self) -> object: ...
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
def compress(data: bytes, compresslevel: int = ...) -> bytes: ...
|
||||
def decompress(data: bytes) -> bytes: ...
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import types
|
||||
from _typeshed import StrPath
|
||||
from os import PathLike
|
||||
from typing import IO, Any, Protocol, TypeVar
|
||||
from typing import IO, Any, Protocol
|
||||
|
||||
from _imp import (
|
||||
acquire_lock as acquire_lock,
|
||||
@@ -15,8 +15,6 @@ from _imp import (
|
||||
release_lock as release_lock,
|
||||
)
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
SEARCH_ERROR: int
|
||||
PY_SOURCE: int
|
||||
PY_COMPILED: int
|
||||
|
||||
@@ -9,7 +9,6 @@ if sys.version_info >= (3, 9):
|
||||
|
||||
__all__ = ["Pool", "ThreadPool"]
|
||||
|
||||
_PT = TypeVar("_PT", bound=Pool)
|
||||
_S = TypeVar("_S")
|
||||
_T = TypeVar("_T")
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@ import sys
|
||||
import types
|
||||
from _typeshed import Self
|
||||
from socket import socket as _socket
|
||||
from typing import Any, BinaryIO, Callable, ClassVar, Type, TypeVar, Union
|
||||
from typing import Any, BinaryIO, Callable, ClassVar, Type, Union
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_RequestType = Union[_socket, tuple[bytes, _socket]]
|
||||
_AddressType = Union[tuple[str, int], str]
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ from typing_extensions import Literal, ParamSpec, final
|
||||
|
||||
# Note, all classes "defined" here require special handling.
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_T1 = TypeVar("_T1")
|
||||
_T2 = TypeVar("_T2")
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
|
||||
@@ -11,7 +11,6 @@ from _weakref import (
|
||||
ref as ref,
|
||||
)
|
||||
|
||||
_S = TypeVar("_S")
|
||||
_T = TypeVar("_T")
|
||||
_KT = TypeVar("_KT")
|
||||
_VT = TypeVar("_VT")
|
||||
|
||||
@@ -23,8 +23,6 @@ from .connection import ConnectionPool
|
||||
from .lock import Lock
|
||||
from .retry import Retry
|
||||
|
||||
_ScoreCastFuncReturn = TypeVar("_ScoreCastFuncReturn")
|
||||
|
||||
_Value = Union[bytes, float, int, str]
|
||||
_Key = Union[str, bytes]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user