mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 19:01:15 +08:00
redis: Add stubs for lmove and blmove (#6586)
This commit is contained in:
@@ -655,6 +655,14 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
|
||||
def ttl(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def type(self, name) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def unlink(self, *names: _Key) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def blmove( # type: ignore[override]
|
||||
self,
|
||||
first_list: _Key,
|
||||
second_list: _Key,
|
||||
timeout: float,
|
||||
src: Literal["LEFT", "RIGHT"] = ...,
|
||||
dest: Literal["LEFT", "RIGHT"] = ...,
|
||||
) -> Pipeline[_StrType]: ...
|
||||
def blpop(self, keys: _Value | Iterable[_Value], timeout: float = ...) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def brpop(self, keys: _Value | Iterable[_Value], timeout: float = ...) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def brpoplpush(self, src, dst, timeout=...) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
@@ -663,6 +671,9 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
|
||||
self, name: _Key, where: Literal["BEFORE", "AFTER", "before", "after"], refvalue: _Value, value: _Value
|
||||
) -> Pipeline[_StrType]: ...
|
||||
def llen(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def lmove( # type: ignore[override]
|
||||
self, first_list: _Key, second_list: _Key, src: Literal["LEFT", "RIGHT"] = ..., dest: Literal["LEFT", "RIGHT"] = ...
|
||||
) -> Pipeline[_StrType]: ...
|
||||
def lpop(self, name, count: int | None = ...) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def lpush(self, name: _Value, *values: _Value) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
def lpushx(self, name, value) -> Pipeline[_StrType]: ... # type: ignore[override]
|
||||
|
||||
@@ -49,6 +49,17 @@ class CoreCommands(Generic[_StrType]):
|
||||
self, name: _Key, where: Literal["BEFORE", "AFTER", "before", "after"], refvalue: _Value, value: _Value
|
||||
) -> int: ...
|
||||
def llen(self, name: _Key) -> int: ...
|
||||
def lmove(
|
||||
self, first_list: _Key, second_list: _Key, src: Literal["LEFT", "RIGHT"] = ..., dest: Literal["LEFT", "RIGHT"] = ...
|
||||
) -> _Value: ...
|
||||
def blmove(
|
||||
self,
|
||||
first_list: _Key,
|
||||
second_list: _Key,
|
||||
timeout: float,
|
||||
src: Literal["LEFT", "RIGHT"] = ...,
|
||||
dest: Literal["LEFT", "RIGHT"] = ...,
|
||||
) -> _Value | None: ...
|
||||
def lpop(self, name, count: int | None = ...): ...
|
||||
def lpush(self, name: _Value, *values: _Value) -> int: ...
|
||||
def lpushx(self, name, value): ...
|
||||
|
||||
Reference in New Issue
Block a user