diff --git a/stdlib/bz2.pyi b/stdlib/bz2.pyi index 6aeaa3da4..69f13e496 100644 --- a/stdlib/bz2.pyi +++ b/stdlib/bz2.pyi @@ -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: ... diff --git a/stdlib/imp.pyi b/stdlib/imp.pyi index 88f2e7893..ec09d18de 100644 --- a/stdlib/imp.pyi +++ b/stdlib/imp.pyi @@ -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 diff --git a/stdlib/multiprocessing/pool.pyi b/stdlib/multiprocessing/pool.pyi index 518e4b736..70098bde7 100644 --- a/stdlib/multiprocessing/pool.pyi +++ b/stdlib/multiprocessing/pool.pyi @@ -9,7 +9,6 @@ if sys.version_info >= (3, 9): __all__ = ["Pool", "ThreadPool"] -_PT = TypeVar("_PT", bound=Pool) _S = TypeVar("_S") _T = TypeVar("_T") diff --git a/stdlib/socketserver.pyi b/stdlib/socketserver.pyi index c663e73be..cbbb1d1f5 100644 --- a/stdlib/socketserver.pyi +++ b/stdlib/socketserver.pyi @@ -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] diff --git a/stdlib/types.pyi b/stdlib/types.pyi index 92f8daa7e..f290f626b 100644 --- a/stdlib/types.pyi +++ b/stdlib/types.pyi @@ -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) diff --git a/stdlib/weakref.pyi b/stdlib/weakref.pyi index fd1cad7fe..f60927595 100644 --- a/stdlib/weakref.pyi +++ b/stdlib/weakref.pyi @@ -11,7 +11,6 @@ from _weakref import ( ref as ref, ) -_S = TypeVar("_S") _T = TypeVar("_T") _KT = TypeVar("_KT") _VT = TypeVar("_VT") diff --git a/stubs/redis/redis/client.pyi b/stubs/redis/redis/client.pyi index 5aba69a20..9a8246a2b 100644 --- a/stubs/redis/redis/client.pyi +++ b/stubs/redis/redis/client.pyi @@ -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]