mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
redis: fix more unconstrained TypeVars (#8084)
This commit is contained in:
@@ -904,7 +904,7 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
end: int,
|
||||
desc: bool,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
byscore: bool = ...,
|
||||
bylex: bool = ...,
|
||||
offset: int | None = ...,
|
||||
@@ -916,16 +916,43 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
name: _Key,
|
||||
start: int,
|
||||
end: int,
|
||||
desc: bool = ...,
|
||||
desc: bool,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], float] = ...,
|
||||
byscore: bool = ...,
|
||||
bylex: bool = ...,
|
||||
offset: int | None = ...,
|
||||
num: int | None = ...,
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
def zrange(
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
end: int,
|
||||
*,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
byscore: bool = ...,
|
||||
bylex: bool = ...,
|
||||
offset: int | None = ...,
|
||||
num: int | None = ...,
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
def zrange(
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
end: int,
|
||||
*,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], float] = ...,
|
||||
byscore: bool = ...,
|
||||
bylex: bool = ...,
|
||||
offset: int | None = ...,
|
||||
num: int | None = ...,
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
def zrange(
|
||||
self,
|
||||
name: _Key,
|
||||
@@ -946,9 +973,11 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
start: int,
|
||||
end: int,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
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]]: ...
|
||||
@overload
|
||||
def zrevrange(
|
||||
self, name: _Key, start: int, end: int, withscores: bool = ..., score_cast_func: Callable[[Any], Any] = ...
|
||||
) -> list[_StrType]: ...
|
||||
@@ -980,9 +1009,13 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = ...,
|
||||
*,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
def zrangebyscore(
|
||||
self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
def zrangebyscore(
|
||||
self,
|
||||
name: _Key,
|
||||
@@ -1003,9 +1036,13 @@ class SortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = ...,
|
||||
*,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
def zrevrangebyscore(
|
||||
self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
def zrevrangebyscore(
|
||||
self,
|
||||
name: _Key,
|
||||
@@ -1068,7 +1105,36 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
end: int,
|
||||
desc: bool,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
byscore: bool = ...,
|
||||
bylex: bool = ...,
|
||||
offset: int | None = ...,
|
||||
num: int | None = ...,
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
async def zrange(
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
end: int,
|
||||
desc: bool,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], float] = ...,
|
||||
byscore: bool = ...,
|
||||
bylex: bool = ...,
|
||||
offset: int | None = ...,
|
||||
num: int | None = ...,
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
async def zrange(
|
||||
self,
|
||||
name: _Key,
|
||||
start: int,
|
||||
end: int,
|
||||
desc: bool = ...,
|
||||
*,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
byscore: bool = ...,
|
||||
bylex: bool = ...,
|
||||
offset: int | None = ...,
|
||||
@@ -1083,12 +1149,12 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
desc: bool = ...,
|
||||
*,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
score_cast_func: Callable[[_StrType], float] = ...,
|
||||
byscore: bool = ...,
|
||||
bylex: bool = ...,
|
||||
offset: int | None = ...,
|
||||
num: int | None = ...,
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
async def zrange(
|
||||
self,
|
||||
@@ -1110,9 +1176,11 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
start: int,
|
||||
end: int,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
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]]: ...
|
||||
@overload
|
||||
async def zrevrange(
|
||||
self, name: _Key, start: int, end: int, withscores: bool = ..., score_cast_func: Callable[[Any], Any] = ...
|
||||
) -> list[_StrType]: ...
|
||||
@@ -1144,9 +1212,13 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = ...,
|
||||
*,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
async def zrangebyscore(
|
||||
self, name: _Key, min: _Value, max: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
async def zrangebyscore(
|
||||
self,
|
||||
name: _Key,
|
||||
@@ -1167,9 +1239,13 @@ class AsyncSortedSetCommands(Generic[_StrType]):
|
||||
num: int | None = ...,
|
||||
*,
|
||||
withscores: Literal[True],
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn] = ...,
|
||||
score_cast_func: Callable[[_StrType], _ScoreCastFuncReturn],
|
||||
) -> list[tuple[_StrType, _ScoreCastFuncReturn]]: ...
|
||||
@overload
|
||||
async def zrevrangebyscore(
|
||||
self, name: _Key, max: _Value, min: _Value, start: int | None = ..., num: int | None = ..., *, withscores: Literal[True]
|
||||
) -> list[tuple[_StrType, float]]: ...
|
||||
@overload
|
||||
async def zrevrangebyscore(
|
||||
self,
|
||||
name: _Key,
|
||||
|
||||
Reference in New Issue
Block a user