mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Fix redis stub hset() to allow only providing mapping (#5168)
* Fix redis stub hset() to allow only providing mapping * Fix redis stub hset() and hmset() mapping type
This commit is contained in:
@@ -729,11 +729,14 @@ class Redis(Generic[_StrType]):
|
||||
def hincrbyfloat(self, name: _Key, key: _Key, amount: float = ...) -> float: ...
|
||||
def hkeys(self, name: _Key) -> List[_StrType]: ...
|
||||
def hlen(self, name: _Key) -> int: ...
|
||||
def hset(
|
||||
self, name: _Key, key: Optional[_Key], value: Optional[_Value], mapping: Optional[Mapping[_Value, _Value]] = ...
|
||||
) -> int: ...
|
||||
@overload
|
||||
def hset(self, name: _Key, key: _Key, value: _Value, mapping: Optional[Mapping[_Key, _Value]] = ...) -> int: ...
|
||||
@overload
|
||||
def hset(self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value]) -> int: ...
|
||||
@overload
|
||||
def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value]) -> int: ...
|
||||
def hsetnx(self, name: _Key, key: _Key, value: _Value) -> int: ...
|
||||
def hmset(self, name: _Key, mapping: Mapping[_Value, _Value]) -> bool: ...
|
||||
def hmset(self, name: _Key, mapping: Mapping[_Key, _Value]) -> bool: ...
|
||||
def hmget(self, name: _Key, keys: Union[_Key, Iterable[_Key]], *args: _Key) -> List[Optional[_StrType]]: ...
|
||||
def hvals(self, name: _Key) -> List[_StrType]: ...
|
||||
def publish(self, channel: _Key, message: _Key) -> int: ...
|
||||
@@ -1093,11 +1096,14 @@ class Pipeline(Redis):
|
||||
def hincrbyfloat(self, name: _Key, key: _Key, amount: float = ...) -> Pipeline: ... # type: ignore [override]
|
||||
def hkeys(self, name: _Key) -> Pipeline: ... # type: ignore [override]
|
||||
def hlen(self, name: _Key) -> Pipeline: ... # type: ignore [override]
|
||||
def hset( # type: ignore [override]
|
||||
self, name: _Key, key: Optional[_Key], value: Optional[_Value], mapping: Optional[Mapping[_Value, _Value]] = ...
|
||||
) -> Pipeline: ...
|
||||
@overload # type: ignore [override]
|
||||
def hset(self, name: _Key, key: _Key, value: _Value, mapping: Optional[Mapping[_Key, _Value]] = ...) -> Pipeline: ...
|
||||
@overload # type: ignore [override]
|
||||
def hset(self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value]) -> int: ...
|
||||
@overload # type: ignore [override]
|
||||
def hset(self, name: _Key, *, mapping: Mapping[_Key, _Value]) -> Pipeline: ...
|
||||
def hsetnx(self, name: _Key, key: _Key, value: _Value) -> Pipeline: ... # type: ignore [override]
|
||||
def hmset(self, name: _Key, mapping: Mapping[_Value, _Value]) -> Pipeline: ... # type: ignore [override]
|
||||
def hmset(self, name: _Key, mapping: Mapping[_Key, _Value]) -> Pipeline: ... # type: ignore [override]
|
||||
def hmget(self, name: _Key, keys: Union[_Key, Iterable[_Key]], *args: _Key) -> Pipeline: ... # type: ignore [override]
|
||||
def hvals(self, name: _Key) -> Pipeline: ... # type: ignore [override]
|
||||
def publish(self, channel: _Key, message: _Key) -> Pipeline: ... # type: ignore [override]
|
||||
|
||||
Reference in New Issue
Block a user