mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 03:41:28 +08:00
Remove even more unused TypeVars (#6928)
This commit is contained in:
@@ -61,7 +61,6 @@ _T3 = TypeVar("_T3")
|
||||
_T4 = TypeVar("_T4")
|
||||
_T5 = TypeVar("_T5")
|
||||
_TT = TypeVar("_TT", bound="type")
|
||||
_TBE = TypeVar("_TBE", bound="BaseException")
|
||||
|
||||
class object:
|
||||
__doc__: str | None
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
from types import FrameType, TracebackType
|
||||
from typing import Any, Callable, Iterable, List, Mapping, Optional, Text, Type, TypeVar
|
||||
from typing import Any, Callable, Iterable, List, Mapping, Optional, Text, Type
|
||||
|
||||
# TODO recursive type
|
||||
_TF = Callable[[FrameType, str, Any], Optional[Callable[..., Any]]]
|
||||
|
||||
_PF = Callable[[FrameType, str, Any], None]
|
||||
_T = TypeVar("_T")
|
||||
|
||||
__all__: List[str]
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ _T3 = TypeVar("_T3")
|
||||
_T4 = TypeVar("_T4")
|
||||
_T5 = TypeVar("_T5")
|
||||
_TT = TypeVar("_TT", bound="type")
|
||||
_TBE = TypeVar("_TBE", bound="BaseException")
|
||||
|
||||
class object:
|
||||
__doc__: str | None
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
from _typeshed import SupportsGetItem, SupportsItemAccess
|
||||
from builtins import type as _type
|
||||
from typing import IO, Any, AnyStr, Iterable, Iterator, List, Mapping, Protocol, TypeVar
|
||||
from typing import IO, Any, AnyStr, Iterable, Iterator, List, Mapping, Protocol
|
||||
from UserDict import UserDict
|
||||
|
||||
_T = TypeVar("_T", bound=FieldStorage)
|
||||
|
||||
def parse(
|
||||
fp: IO[Any] | None = ...,
|
||||
environ: SupportsItemAccess[str, str] = ...,
|
||||
|
||||
@@ -3,11 +3,9 @@ from typing import IO, Any, Callable, ContextManager, Iterable, Iterator, Option
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
_T_io = TypeVar("_T_io", bound=Optional[IO[str]])
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
|
||||
_ExitFunc = Callable[[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]], bool]
|
||||
_CM_EF = TypeVar("_CM_EF", ContextManager[Any], _ExitFunc)
|
||||
|
||||
class GeneratorContextManager(ContextManager[_T_co]):
|
||||
def __call__(self, func: _F) -> _F: ...
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
from _typeshed import SupportsRead, SupportsReadline
|
||||
from socket import socket
|
||||
from ssl import SSLContext
|
||||
from typing import Any, BinaryIO, Callable, List, Text, Tuple, Type, TypeVar, Union
|
||||
from typing import Any, BinaryIO, Callable, List, Text, Tuple, Type, Union
|
||||
from typing_extensions import Literal
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_IntOrStr = Union[int, Text]
|
||||
|
||||
MSG_OOB: int
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, List, TypeVar
|
||||
|
||||
_T = TypeVar("_T", bound=Pool)
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, List
|
||||
|
||||
class AsyncResult:
|
||||
def get(self, timeout: float | None = ...) -> Any: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import Any, BinaryIO, Iterable, List, Text, Tuple, TypeVar, Union, overload
|
||||
from typing import Any, BinaryIO, Iterable, List, Text, Tuple, Union, overload
|
||||
|
||||
# ----- Constants -----
|
||||
# Some socket families are listed in the "Socket families" section of the docs,
|
||||
@@ -380,7 +380,6 @@ _RetAddress = Any
|
||||
_WriteBuffer = Union[bytearray, memoryview]
|
||||
|
||||
_CMSG = Tuple[int, int, bytes]
|
||||
_SelfT = TypeVar("_SelfT", bound=socket)
|
||||
|
||||
class socket:
|
||||
family: int
|
||||
|
||||
@@ -5,7 +5,6 @@ from typing import Any, Callable, Iterable, List, Mapping, Optional, Text, Type,
|
||||
_TF = Callable[[FrameType, str, Any], Optional[Callable[..., Any]]]
|
||||
|
||||
_PF = Callable[[FrameType, str, Any], None]
|
||||
_T = TypeVar("_T")
|
||||
|
||||
__all__: List[str]
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ from _weakref import (
|
||||
)
|
||||
from exceptions import ReferenceError as ReferenceError
|
||||
|
||||
_S = TypeVar("_S")
|
||||
_T = TypeVar("_T")
|
||||
_KT = TypeVar("_KT")
|
||||
_VT = TypeVar("_VT")
|
||||
|
||||
Reference in New Issue
Block a user