mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 13:32:26 +08:00
Bump mypy to 1.11.1 (#12463)
This commit is contained in:
@@ -6,7 +6,7 @@ from typing_extensions import Self
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@overload
|
||||
def ord_(dta: str) -> int: ... # type: ignore[overload-overlap]
|
||||
def ord_(dta: str) -> int: ...
|
||||
@overload
|
||||
def ord_(dta: _T) -> _T: ...
|
||||
def make_string(seq: str | list[int]) -> str: ...
|
||||
|
||||
@@ -60,7 +60,7 @@ def serialize_option(options_dict: _Options, key: str, upper: bool = False) -> N
|
||||
@overload
|
||||
def ensure_iterable(inst: str) -> list[str]: ... # type: ignore[overload-overlap]
|
||||
@overload
|
||||
def ensure_iterable(inst: _IterableT) -> _IterableT: ...
|
||||
def ensure_iterable(inst: _IterableT) -> _IterableT: ... # type: ignore[overload-overlap]
|
||||
@overload
|
||||
def ensure_iterable(inst: _T) -> list[_T]: ...
|
||||
def sanitize_regex_param(param: str | list[str]) -> list[str]: ...
|
||||
|
||||
@@ -40,7 +40,7 @@ class HmacAuthV3HTTPHandler(AuthHandler, HmacKeys):
|
||||
def headers_to_sign(self, http_request): ...
|
||||
def canonical_headers(self, headers_to_sign): ...
|
||||
def string_to_sign(self, http_request): ...
|
||||
def add_auth(self, req, **kwargs): ...
|
||||
def add_auth(self, req, **kwargs): ... # type: ignore[override]
|
||||
|
||||
class HmacAuthV4Handler(AuthHandler, HmacKeys):
|
||||
capability: Any
|
||||
@@ -65,7 +65,7 @@ class HmacAuthV4Handler(AuthHandler, HmacKeys):
|
||||
def credential_scope(self, http_request): ...
|
||||
def string_to_sign(self, http_request, canonical_request): ...
|
||||
def signature(self, http_request, string_to_sign): ...
|
||||
def add_auth(self, req, **kwargs): ...
|
||||
def add_auth(self, req, **kwargs): ... # type: ignore[override]
|
||||
|
||||
class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler):
|
||||
capability: Any
|
||||
@@ -80,7 +80,7 @@ class S3HmacAuthV4Handler(HmacAuthV4Handler, AuthHandler):
|
||||
def determine_service_name(self, host): ...
|
||||
def mangle_path_and_params(self, req): ...
|
||||
def payload(self, http_request): ...
|
||||
def add_auth(self, req, **kwargs): ...
|
||||
def add_auth(self, req, **kwargs): ... # type: ignore[override]
|
||||
def presign(self, req, expires, iso_date: Incomplete | None = None): ...
|
||||
|
||||
class STSAnonHandler(AuthHandler):
|
||||
@@ -105,7 +105,7 @@ class QuerySignatureV2AuthHandler(QuerySignatureHelper, AuthHandler):
|
||||
|
||||
class POSTPathQSV2AuthHandler(QuerySignatureV2AuthHandler, AuthHandler):
|
||||
capability: Any
|
||||
def add_auth(self, req, **kwargs): ...
|
||||
def add_auth(self, req, **kwargs): ... # type: ignore[override]
|
||||
|
||||
def get_auth_handler(host, config, provider, requested_capability: Incomplete | None = None): ...
|
||||
def detect_potential_sigv4(func): ...
|
||||
|
||||
@@ -8,6 +8,6 @@ class Secret(Model):
|
||||
|
||||
class SecretCollection(Collection[Secret]):
|
||||
model: type[Secret]
|
||||
def create(self, **kwargs): ...
|
||||
def create(self, **kwargs): ... # type: ignore[override]
|
||||
def get(self, secret_id): ...
|
||||
def list(self, **kwargs): ...
|
||||
|
||||
@@ -15,9 +15,9 @@ class SSHSocket(socket.socket):
|
||||
def __init__(self, host) -> None: ...
|
||||
def connect(self, **kwargs) -> None: ... # type:ignore[override]
|
||||
def sendall(self, data) -> None: ... # type:ignore[override]
|
||||
def send(self, data): ...
|
||||
def recv(self, n): ...
|
||||
def makefile(self, mode): ...
|
||||
def send(self, data): ... # type:ignore[override]
|
||||
def recv(self, n): ... # type:ignore[override]
|
||||
def makefile(self, mode): ... # type:ignore[override]
|
||||
def close(self) -> None: ...
|
||||
|
||||
class SSHConnection(urllib3.connection.HTTPConnection):
|
||||
|
||||
@@ -14,4 +14,6 @@ def first(iterable: Iterable[_T], default: _S) -> _T | _S: ...
|
||||
@overload
|
||||
def first(iterable: Iterable[_T], default: _S, key: Callable[[_T], Any] | None) -> _T | _S: ...
|
||||
@overload
|
||||
def first(iterable: Iterable[_T], default: None, key: Callable[[_T], Any] | None) -> _T | None: ...
|
||||
@overload
|
||||
def first(iterable: Iterable[_T], *, key: Callable[[_T], Any] | None) -> _T | None: ...
|
||||
|
||||
@@ -43,6 +43,8 @@ class Timeout(BaseException):
|
||||
# when timeout_value is provided we unfortunately get no type checking on *args, **kwargs, because
|
||||
# ParamSpec does not allow mixing in additional keyword arguments
|
||||
@overload
|
||||
def with_timeout(seconds: float | None, function: Callable[..., _T1], *args: Any, timeout_value: _T2, **kwds: Any) -> _T1 | _T2: ... # type: ignore[misc]
|
||||
def with_timeout(
|
||||
seconds: float | None, function: Callable[..., _T1], *args: Any, timeout_value: _T2, **kwds: Any
|
||||
) -> _T1 | _T2: ...
|
||||
@overload
|
||||
def with_timeout(seconds: float | None, function: Callable[_P, _T], *args: _P.args, **kwds: _P.kwargs) -> _T: ...
|
||||
|
||||
@@ -34,12 +34,12 @@ class _GlobalCacheSetBatch(_GlobalCacheBatch):
|
||||
def done_callback(self, cache_call) -> None: ...
|
||||
def add(self, key, value): ...
|
||||
def make_call(self): ...
|
||||
def future_info(self, key, value): ...
|
||||
def future_info(self, key, value): ... # type:ignore[override]
|
||||
|
||||
class _GlobalCacheSetIfNotExistsBatch(_GlobalCacheSetBatch):
|
||||
def add(self, key, value): ...
|
||||
def make_call(self): ...
|
||||
def future_info(self, key, value): ...
|
||||
def future_info(self, key, value): ... # type:ignore[override]
|
||||
|
||||
global_delete: Any
|
||||
|
||||
@@ -55,7 +55,7 @@ global_watch: Any
|
||||
|
||||
class _GlobalCacheWatchBatch(_GlobalCacheDeleteBatch):
|
||||
def make_call(self): ...
|
||||
def future_info(self, key, value): ...
|
||||
def future_info(self, key, value): ... # type:ignore[override]
|
||||
|
||||
def global_unwatch(key): ...
|
||||
|
||||
@@ -67,7 +67,7 @@ global_compare_and_swap: Any
|
||||
|
||||
class _GlobalCacheCompareAndSwapBatch(_GlobalCacheSetBatch):
|
||||
def make_call(self): ...
|
||||
def future_info(self, key, value): ...
|
||||
def future_info(self, key, value): ... # type:ignore[override]
|
||||
|
||||
def is_locked_value(value): ...
|
||||
def global_cache_key(key): ...
|
||||
|
||||
@@ -15,7 +15,7 @@ class BoundMethodDispatcher(Mapping[Any, Any]):
|
||||
dispatcher: Any
|
||||
def __init__(self, instance, dispatcher) -> None: ...
|
||||
def __getitem__(self, key): ...
|
||||
def get(self, key, default): ...
|
||||
def get(self, key, default): ... # type: ignore[override]
|
||||
def __iter__(self): ...
|
||||
def __len__(self) -> int: ...
|
||||
def __contains__(self, key): ...
|
||||
|
||||
@@ -8,10 +8,10 @@ DEFAULT_ENCODING: str
|
||||
def from_unicode(value: str | bytes, encoding: str = "utf-8") -> bytes: ...
|
||||
def to_unicode(value: str | bytes, encoding: str = "utf-8") -> str: ...
|
||||
@overload
|
||||
def data_encode(data: str, encoding: str = ...) -> bytes: ... # type: ignore[misc]
|
||||
def data_encode(data: str, encoding: str = ...) -> bytes: ...
|
||||
@overload
|
||||
def data_encode(data: dict[Any, Any], encoding: str = ...) -> dict[Any, Any]: ...
|
||||
@overload
|
||||
def data_encode(data: list[Any] | tuple[Any, ...], encoding: str = ...) -> list[Any]: ... # type: ignore[misc]
|
||||
def data_encode(data: list[Any] | tuple[Any, ...], encoding: str = ...) -> list[Any]: ...
|
||||
@overload
|
||||
def data_encode(data: _T, encoding: str = ...) -> _T: ...
|
||||
|
||||
@@ -72,7 +72,7 @@ class OutEdgeView(AbstractSet[Incomplete], Mapping[Incomplete, Incomplete], Gene
|
||||
def __contains__(self, e: _Edge[_Node]) -> bool: ... # type: ignore[override]
|
||||
def __getitem__(self, e: _Edge[_Node]) -> dict[str, Any]: ...
|
||||
@overload
|
||||
def __call__(self, nbunch: None = None, data: Literal[False] = False, *, default: Unused = None) -> Self: ...
|
||||
def __call__(self, nbunch: None = None, data: Literal[False] = False, *, default: Unused = None) -> Self: ... # type: ignore[overload-overlap]
|
||||
@overload
|
||||
def __call__(
|
||||
self, nbunch: _Node | Iterable[_Node], data: Literal[False] = False, *, default: None = None
|
||||
|
||||
@@ -8,4 +8,4 @@ log: Any
|
||||
class AuthorizationCodeGrant(GrantTypeBase):
|
||||
proxy_target: Any
|
||||
def __init__(self, request_validator: Incomplete | None = None, **kwargs) -> None: ...
|
||||
def add_id_token(self, token, token_handler, request): ...
|
||||
def add_id_token(self, token, token_handler, request): ... # type: ignore[override]
|
||||
|
||||
@@ -12,5 +12,5 @@ class HybridGrant(GrantTypeBase):
|
||||
request_validator: Any
|
||||
proxy_target: Any
|
||||
def __init__(self, request_validator: Incomplete | None = None, **kwargs) -> None: ...
|
||||
def add_id_token(self, token, token_handler, request): ...
|
||||
def add_id_token(self, token, token_handler, request): ... # type: ignore[override]
|
||||
def openid_authorization_validator(self, request): ...
|
||||
|
||||
@@ -8,5 +8,5 @@ log: Any
|
||||
class ImplicitGrant(GrantTypeBase):
|
||||
proxy_target: Any
|
||||
def __init__(self, request_validator: Incomplete | None = None, **kwargs) -> None: ...
|
||||
def add_id_token(self, token, token_handler, request): ...
|
||||
def add_id_token(self, token, token_handler, request): ... # type: ignore[override]
|
||||
def openid_authorization_validator(self, request): ...
|
||||
|
||||
@@ -7,4 +7,4 @@ log: Incomplete
|
||||
class RefreshTokenGrant(GrantTypeBase):
|
||||
proxy_target: Incomplete
|
||||
def __init__(self, request_validator: Incomplete | None = None, **kwargs) -> None: ...
|
||||
def add_id_token(self, token, token_handler, request): ...
|
||||
def add_id_token(self, token, token_handler, request): ... # type: ignore[override]
|
||||
|
||||
@@ -166,9 +166,9 @@ class OleDirectoryEntry(Generic[AnyStr]):
|
||||
def build_storage_tree(self) -> None: ...
|
||||
def append_kids(self, child_sid: int) -> None: ...
|
||||
def __eq__(self, other: OleDirectoryEntry[AnyStr]) -> bool: ... # type: ignore[override]
|
||||
def __lt__(self, other: OleDirectoryEntry[AnyStr]) -> bool: ... # type: ignore[override]
|
||||
def __lt__(self, other: OleDirectoryEntry[AnyStr]) -> bool: ...
|
||||
def __ne__(self, other: OleDirectoryEntry[AnyStr]) -> bool: ... # type: ignore[override]
|
||||
def __le__(self, other: OleDirectoryEntry[AnyStr]) -> bool: ... # type: ignore[override]
|
||||
def __le__(self, other: OleDirectoryEntry[AnyStr]) -> bool: ...
|
||||
def dump(self, tab: int = 0) -> None: ...
|
||||
def getmtime(self) -> datetime.datetime | None: ...
|
||||
def getctime(self) -> datetime.datetime | None: ...
|
||||
|
||||
@@ -37,7 +37,7 @@ class Nested(Descriptor[_T]):
|
||||
def __set__(self, instance: Serialisable | Strict, value: _HasTagAndGet[_T] | _T) -> None: ...
|
||||
def from_tree(self, node: _HasGet[_T]) -> _T: ...
|
||||
@overload
|
||||
def to_tree(self, tagname: Unused = None, value: None = None, namespace: Unused = None) -> None: ... # type: ignore[overload-overlap]
|
||||
def to_tree(self, tagname: Unused = None, value: None = None, namespace: Unused = None) -> None: ...
|
||||
@overload
|
||||
def to_tree(self, tagname: str, value: object, namespace: str | None = None) -> Element: ...
|
||||
|
||||
@@ -155,7 +155,7 @@ class NestedText(NestedValue[_T, _N]):
|
||||
def __set__(self: NestedText[_T, Literal[True]], instance: Serialisable | Strict, value: _T | int | Any | None) -> None: ...
|
||||
def from_tree(self, node: _HasText) -> str: ... # type: ignore[override]
|
||||
@overload
|
||||
def to_tree(self, tagname: Unused = None, value: None = None, namespace: Unused = None) -> None: ... # type: ignore[overload-overlap]
|
||||
def to_tree(self, tagname: Unused = None, value: None = None, namespace: Unused = None) -> None: ...
|
||||
@overload
|
||||
def to_tree(self, tagname: str, value: object, namespace: str | None = None) -> Element: ...
|
||||
|
||||
@@ -271,8 +271,6 @@ class EmptyTag(Nested[bool], Bool[_N]): # type: ignore[misc]
|
||||
def __set__(self, instance: Serialisable | Strict, value: _HasTagAndGet[_ConvertibleToBool] | _ConvertibleToBool) -> None: ...
|
||||
def from_tree(self, node: Unused) -> Literal[True]: ...
|
||||
@overload
|
||||
def to_tree( # type: ignore[overload-overlap]
|
||||
self, tagname: Unused = None, value: None = None, namespace: Unused = None
|
||||
) -> None: ...
|
||||
def to_tree(self, tagname: Unused = None, value: None = None, namespace: Unused = None) -> None: ...
|
||||
@overload
|
||||
def to_tree(self, tagname: str, value: object, namespace: str | None = None) -> Element: ...
|
||||
|
||||
@@ -44,7 +44,7 @@ class NamedStyle(Serialisable):
|
||||
def as_name(self) -> _NamedCellStyle: ...
|
||||
|
||||
class NamedStyleList(list[NamedStyle]):
|
||||
def __init__(self, iterable: Iterable[NamedStyle] = ()) -> None: ... # type: ignore[override]
|
||||
def __init__(self, iterable: Iterable[NamedStyle] = ()) -> None: ...
|
||||
@property
|
||||
def names(self) -> list[str]: ...
|
||||
def __getitem__(self, key: int | str) -> NamedStyle: ... # type: ignore[override]
|
||||
|
||||
@@ -77,7 +77,7 @@ def fromstring(text: str | ReadableBuffer, parser: XMLParser | None = None) -> E
|
||||
# from lxml.etree import fromstring
|
||||
# But made partial, removing parser arg
|
||||
@overload
|
||||
def fromstring(text: str | bytes, *, base_url: str | bytes = ...) -> _lxml_Element: ... # type: ignore[overload-overlap]
|
||||
def fromstring(text: str | bytes, *, base_url: str | bytes = ...) -> _lxml_Element: ...
|
||||
|
||||
# from defusedxml.ElementTree import fromstring
|
||||
@overload
|
||||
|
||||
@@ -239,13 +239,13 @@ class ColumnBase(Node):
|
||||
def __invert__(self): ...
|
||||
__and__: Incomplete
|
||||
__or__: Incomplete
|
||||
__add__: Callable[[Self, Any], Expression]
|
||||
def __add__(self, rhs: Any) -> Expression: ...
|
||||
__sub__: Incomplete
|
||||
__mul__: Callable[[Self, Any], Expression]
|
||||
__div__: Callable[[Self, Any], Expression]
|
||||
__truediv__: Callable[[Self, Any], Expression]
|
||||
__xor__: Callable[[Self, Any], Expression]
|
||||
__radd__: Callable[[Self, Any], Expression]
|
||||
def __radd__(self, rhs: Any) -> Expression: ...
|
||||
__rsub__: Callable[[Self, Any], Expression]
|
||||
__rmul__: Callable[[Self, Any], Expression]
|
||||
__rdiv__: Callable[[Self, Any], Expression]
|
||||
|
||||
@@ -23,7 +23,7 @@ class PopenSpawn(SpawnBase[AnyStr]):
|
||||
preexec_fn: Callable[[], None] | None = None,
|
||||
) -> None: ...
|
||||
flag_eof: bool
|
||||
def read_nonblocking(self, size, timeout): ...
|
||||
def read_nonblocking(self, size, timeout): ... # type: ignore[override]
|
||||
def write(self, s) -> None: ...
|
||||
def writelines(self, sequence) -> None: ...
|
||||
def send(self, s): ...
|
||||
|
||||
@@ -22,7 +22,7 @@ def merge(rleObjs: list[_EncodedRLE], intersect: int = ...) -> _EncodedRLE: ...
|
||||
|
||||
# ignore an "overlapping overloads" error due to _NDArrayInt32 being an alias for `Incomplete` for now
|
||||
@overload
|
||||
def frPyObjects(pyobj: _NDArrayUInt32 | list[list[int]] | list[_EncodedRLE], h: int, w: int) -> list[_EncodedRLE]: ... # type: ignore[overload-overlap]
|
||||
def frPyObjects(pyobj: _NDArrayUInt32 | list[list[int]] | list[_EncodedRLE], h: int, w: int) -> list[_EncodedRLE]: ...
|
||||
@overload
|
||||
def frPyObjects(pyobj: list[int] | _EncodedRLE, h: int, w: int) -> _EncodedRLE: ...
|
||||
def encode(bimask: _NDArrayUInt8) -> _EncodedRLE: ...
|
||||
|
||||
@@ -17,7 +17,7 @@ class DebugStackFrame(gateways.DebugStackFrame):
|
||||
def GetThread(self) -> None: ...
|
||||
def GetCodeContext(self): ...
|
||||
def GetDescriptionString(self, fLong): ...
|
||||
def GetLanguageString(self, fLong): ...
|
||||
def GetLanguageString(self, fLong): ... # type: ignore[override]
|
||||
def GetDebugProperty(self): ...
|
||||
|
||||
class DebugStackFrameSniffer:
|
||||
|
||||
@@ -1023,7 +1023,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
@overload
|
||||
def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: float) -> tuple[_StrType, _StrType, float] | None: ...
|
||||
@overload
|
||||
def zrange(
|
||||
def zrange( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
@@ -1037,7 +1037,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = None,
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
def zrange(
|
||||
def zrange( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
@@ -1051,7 +1051,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = None,
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
def zrange(
|
||||
def zrange( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
@@ -1065,7 +1065,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = None,
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
def zrange(
|
||||
def zrange( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
@@ -1102,7 +1102,9 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
def zrevrange(self, name: _Key, start: int, end: int, withscores: Literal[True]) -> list[tuple[_StrType, float]]: ...
|
||||
def zrevrange( # type: ignore[overload-overlap]
|
||||
self, name: _Key, start: int, end: int, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
def zrevrange(
|
||||
self, name: _Key, start: int, end: int, withscores: bool = False, score_cast_func: Callable[[Any], Any] = ...
|
||||
@@ -1126,7 +1128,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None
|
||||
) -> list[_StrType]: ...
|
||||
@overload
|
||||
def zrangebyscore(
|
||||
def zrangebyscore( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
min: _Value,
|
||||
@@ -1138,7 +1140,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
def zrangebyscore(
|
||||
def zrangebyscore( # type: ignore[overload-overlap]
|
||||
self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
@@ -1153,7 +1155,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
score_cast_func: Callable[[_StrType], Any] = ...,
|
||||
) -> list[_StrType]: ...
|
||||
@overload
|
||||
def zrevrangebyscore(
|
||||
def zrevrangebyscore( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
max: _Value,
|
||||
@@ -1165,7 +1167,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
def zrevrangebyscore(
|
||||
def zrevrangebyscore( # type: ignore[overload-overlap]
|
||||
self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
@@ -1224,7 +1226,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
@overload
|
||||
async def bzpopmin(self, keys: _Key | Iterable[_Key], timeout: float) -> tuple[_StrType, _StrType, float] | None: ...
|
||||
@overload
|
||||
async def zrange(
|
||||
async def zrange( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
@@ -1238,7 +1240,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = None,
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
async def zrange(
|
||||
async def zrange( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
@@ -1252,7 +1254,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = None,
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
async def zrange(
|
||||
async def zrange( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
@@ -1267,7 +1269,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = None,
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
async def zrange(
|
||||
async def zrange( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
@@ -1305,7 +1307,9 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
async def zrevrange(self, name: _Key, start: int, end: int, withscores: Literal[True]) -> list[tuple[_StrType, float]]: ...
|
||||
async def zrevrange( # type: ignore[overload-overlap]
|
||||
self, name: _Key, start: int, end: int, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
async def zrevrange(
|
||||
self, name: _Key, start: int, end: int, withscores: bool = False, score_cast_func: Callable[[Any], Any] = ...
|
||||
@@ -1329,7 +1333,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None
|
||||
) -> list[_StrType]: ...
|
||||
@overload
|
||||
async def zrangebyscore(
|
||||
async def zrangebyscore( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
min: _Value,
|
||||
@@ -1341,7 +1345,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
async def zrangebyscore(
|
||||
async def zrangebyscore( # type: ignore[overload-overlap]
|
||||
self, name: _Key, min: _Value, max: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
@@ -1356,7 +1360,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
score_cast_func: Callable[[_StrType], Any] = ...,
|
||||
) -> list[_StrType]: ...
|
||||
@overload
|
||||
async def zrevrangebyscore(
|
||||
async def zrevrangebyscore( # type: ignore[overload-overlap]
|
||||
self,
|
||||
name: _Key,
|
||||
max: _Value,
|
||||
@@ -1368,7 +1372,7 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
async def zrevrangebyscore(
|
||||
async def zrevrangebyscore( # type: ignore[overload-overlap]
|
||||
self, name: _Key, max: _Value, min: _Value, start: int | None = None, num: int | None = None, *, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
|
||||
@@ -48,7 +48,8 @@ class UntrustedAstTransformer(ast.NodeTransformer):
|
||||
def visit_Subscript(self, node): ...
|
||||
def visit_Assign(self, node): ...
|
||||
def visit_AugAssign(self, node): ...
|
||||
def visit_While(node): ...
|
||||
# Bug in `reportlab`'s source code:
|
||||
def visit_While(node): ... # type: ignore[override]
|
||||
def visit_ExceptHandler(self, node): ...
|
||||
def visit_With(self, node): ...
|
||||
def visit_FunctionDef(self, node): ...
|
||||
|
||||
@@ -124,7 +124,7 @@ class WorkingSet:
|
||||
def __iter__(self) -> Iterator[Distribution]: ...
|
||||
def add(self, dist: Distribution, entry: str | None = None, insert: bool = True, replace: bool = False) -> None: ...
|
||||
@overload
|
||||
def resolve( # type: ignore[overload-overlap]
|
||||
def resolve(
|
||||
self,
|
||||
requirements: Iterable[Requirement],
|
||||
env: Environment | None,
|
||||
@@ -133,7 +133,7 @@ class WorkingSet:
|
||||
extras: tuple[str, ...] | None = None,
|
||||
) -> list[_DistributionT]: ...
|
||||
@overload
|
||||
def resolve( # type: ignore[overload-overlap]
|
||||
def resolve(
|
||||
self,
|
||||
requirements: Iterable[Requirement],
|
||||
env: Environment | None = None,
|
||||
@@ -143,7 +143,7 @@ class WorkingSet:
|
||||
extras: tuple[str, ...] | None = None,
|
||||
) -> list[_DistributionT]: ...
|
||||
@overload
|
||||
def resolve( # type: ignore[overload-overlap]
|
||||
def resolve(
|
||||
self,
|
||||
requirements: Iterable[Requirement],
|
||||
env: Environment | None = None,
|
||||
@@ -152,7 +152,7 @@ class WorkingSet:
|
||||
extras: tuple[str, ...] | None = None,
|
||||
) -> list[Distribution]: ...
|
||||
@overload
|
||||
def find_plugins( # type: ignore[overload-overlap]
|
||||
def find_plugins(
|
||||
self,
|
||||
plugin_env: Environment,
|
||||
full_env: Environment | None,
|
||||
@@ -160,7 +160,7 @@ class WorkingSet:
|
||||
fallback: bool = True,
|
||||
) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
|
||||
@overload
|
||||
def find_plugins( # type: ignore[overload-overlap]
|
||||
def find_plugins(
|
||||
self,
|
||||
plugin_env: Environment,
|
||||
full_env: Environment | None = None,
|
||||
@@ -205,7 +205,7 @@ class Environment:
|
||||
replace_conflicting: bool = False,
|
||||
) -> Distribution | None: ...
|
||||
@overload
|
||||
def obtain(self, requirement: Requirement, installer: _InstallerTypeT[_DistributionT]) -> _DistributionT: ... # type: ignore[overload-overlap]
|
||||
def obtain(self, requirement: Requirement, installer: _InstallerTypeT[_DistributionT]) -> _DistributionT: ...
|
||||
@overload
|
||||
def obtain(self, requirement: Requirement, installer: Callable[[Requirement], None] | None = None) -> None: ...
|
||||
@overload
|
||||
|
||||
@@ -79,7 +79,7 @@ class Command(_Command):
|
||||
# Any: Dynamic command subclass attributes
|
||||
def __init__(self, dist: Distribution, **kw: Any) -> None: ...
|
||||
def ensure_string_list(self, option: str) -> None: ...
|
||||
@overload # type: ignore[override] # Extra **kw param
|
||||
@overload # Extra **kw param
|
||||
def reinitialize_command(self, command: str, reinit_subcommands: bool = False, **kw) -> _Command: ...
|
||||
@overload
|
||||
def reinitialize_command(self, command: _CommandT, reinit_subcommands: bool = False, **kw) -> _CommandT: ...
|
||||
|
||||
Reference in New Issue
Block a user