Skip to content

Commit 425ba77

Browse files
authored
Remove even more unused TypeVars (#6928)
1 parent dbcb38a commit 425ba77

File tree

10 files changed

+5
-18
lines changed

10 files changed

+5
-18
lines changed

stdlib/@python2/__builtin__.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ _T3 = TypeVar("_T3")
6161
_T4 = TypeVar("_T4")
6262
_T5 = TypeVar("_T5")
6363
_TT = TypeVar("_TT", bound="type")
64-
_TBE = TypeVar("_TBE", bound="BaseException")
6564

6665
class object:
6766
__doc__: str | None

stdlib/@python2/_dummy_threading.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from types import FrameType, TracebackType
2-
from typing import Any, Callable, Iterable, List, Mapping, Optional, Text, Type, TypeVar
2+
from typing import Any, Callable, Iterable, List, Mapping, Optional, Text, Type
33

44
# TODO recursive type
55
_TF = Callable[[FrameType, str, Any], Optional[Callable[..., Any]]]
66

77
_PF = Callable[[FrameType, str, Any], None]
8-
_T = TypeVar("_T")
98

109
__all__: List[str]
1110

stdlib/@python2/builtins.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ _T3 = TypeVar("_T3")
6161
_T4 = TypeVar("_T4")
6262
_T5 = TypeVar("_T5")
6363
_TT = TypeVar("_TT", bound="type")
64-
_TBE = TypeVar("_TBE", bound="BaseException")
6564

6665
class object:
6766
__doc__: str | None

stdlib/@python2/cgi.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
from _typeshed import SupportsGetItem, SupportsItemAccess
22
from builtins import type as _type
3-
from typing import IO, Any, AnyStr, Iterable, Iterator, List, Mapping, Protocol, TypeVar
3+
from typing import IO, Any, AnyStr, Iterable, Iterator, List, Mapping, Protocol
44
from UserDict import UserDict
55

6-
_T = TypeVar("_T", bound=FieldStorage)
7-
86
def parse(
97
fp: IO[Any] | None = ...,
108
environ: SupportsItemAccess[str, str] = ...,

stdlib/@python2/contextlib.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ from typing import IO, Any, Callable, ContextManager, Iterable, Iterator, Option
33

44
_T = TypeVar("_T")
55
_T_co = TypeVar("_T_co", covariant=True)
6-
_T_io = TypeVar("_T_io", bound=Optional[IO[str]])
76
_F = TypeVar("_F", bound=Callable[..., Any])
87

98
_ExitFunc = Callable[[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]], bool]
10-
_CM_EF = TypeVar("_CM_EF", ContextManager[Any], _ExitFunc)
119

1210
class GeneratorContextManager(ContextManager[_T_co]):
1311
def __call__(self, func: _F) -> _F: ...

stdlib/@python2/ftplib.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from _typeshed import SupportsRead, SupportsReadline
22
from socket import socket
33
from ssl import SSLContext
4-
from typing import Any, BinaryIO, Callable, List, Text, Tuple, Type, TypeVar, Union
4+
from typing import Any, BinaryIO, Callable, List, Text, Tuple, Type, Union
55
from typing_extensions import Literal
66

7-
_T = TypeVar("_T")
87
_IntOrStr = Union[int, Text]
98

109
MSG_OOB: int

stdlib/@python2/multiprocessing/pool.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
from typing import Any, Callable, Dict, Iterable, Iterator, List, TypeVar
2-
3-
_T = TypeVar("_T", bound=Pool)
1+
from typing import Any, Callable, Dict, Iterable, Iterator, List
42

53
class AsyncResult:
64
def get(self, timeout: float | None = ...) -> Any: ...

stdlib/@python2/socket.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from typing import Any, BinaryIO, Iterable, List, Text, Tuple, TypeVar, Union, overload
2+
from typing import Any, BinaryIO, Iterable, List, Text, Tuple, Union, overload
33

44
# ----- Constants -----
55
# Some socket families are listed in the "Socket families" section of the docs,
@@ -380,7 +380,6 @@ _RetAddress = Any
380380
_WriteBuffer = Union[bytearray, memoryview]
381381

382382
_CMSG = Tuple[int, int, bytes]
383-
_SelfT = TypeVar("_SelfT", bound=socket)
384383

385384
class socket:
386385
family: int

stdlib/@python2/threading.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ from typing import Any, Callable, Iterable, List, Mapping, Optional, Text, Type,
55
_TF = Callable[[FrameType, str, Any], Optional[Callable[..., Any]]]
66

77
_PF = Callable[[FrameType, str, Any], None]
8-
_T = TypeVar("_T")
98

109
__all__: List[str]
1110

stdlib/@python2/weakref.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ from _weakref import (
1212
)
1313
from exceptions import ReferenceError as ReferenceError
1414

15-
_S = TypeVar("_S")
1615
_T = TypeVar("_T")
1716
_KT = TypeVar("_KT")
1817
_VT = TypeVar("_VT")

0 commit comments

Comments
 (0)