diff options
author | Oleg A <t0rr@mail.ru> | 2022-05-30 13:28:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 13:28:03 +0300 |
commit | 84418d62db0aef3178d5eecec47d5121ce82a1d4 (patch) | |
tree | 2f4cc155863018ec16cc19fc6a02a19769e9209c | |
parent | 0d3da4e1bb3660285694b27c19c8d2498f0d42e7 (diff) | |
download | redis-py-84418d62db0aef3178d5eecec47d5121ce82a1d4.tar.gz |
fix: changed list type to single element type (#2203)
-rw-r--r-- | redis/commands/core.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py index 3569d20..ad7d7a6 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -2593,7 +2593,7 @@ class ListCommands(CommandsProtocol): else: return self.execute_command("LPOP", name) - def lpush(self, name: str, *values: List) -> Union[Awaitable[int], int]: + def lpush(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]: """ Push ``values`` onto the head of the list ``name`` @@ -2601,7 +2601,7 @@ class ListCommands(CommandsProtocol): """ return self.execute_command("LPUSH", name, *values) - def lpushx(self, name: str, *values: List) -> Union[Awaitable[int], int]: + def lpushx(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]: """ Push ``value`` onto the head of the list ``name`` if ``name`` exists @@ -2679,7 +2679,7 @@ class ListCommands(CommandsProtocol): """ return self.execute_command("RPOPLPUSH", src, dst) - def rpush(self, name: str, *values: List) -> Union[Awaitable[int], int]: + def rpush(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]: """ Push ``values`` onto the tail of the list ``name`` @@ -3169,7 +3169,7 @@ class SetCommands(CommandsProtocol): see: https://redis.io/topics/data-types#sets """ - def sadd(self, name: str, *values: List) -> Union[Awaitable[int], int]: + def sadd(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]: """ Add ``value(s)`` to set ``name`` @@ -3307,7 +3307,7 @@ class SetCommands(CommandsProtocol): args = (number is not None) and [number] or [] return self.execute_command("SRANDMEMBER", name, *args) - def srem(self, name: str, *values: List) -> Union[Awaitable[int], int]: + def srem(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]: """ Remove ``values`` from set ``name`` @@ -4586,7 +4586,7 @@ class SortedSetCommands(CommandsProtocol): """ return self.execute_command("ZRANK", name, value) - def zrem(self, name: KeyT, *values: EncodableT) -> ResponseT: + def zrem(self, name: KeyT, *values: FieldT) -> ResponseT: """ Remove member ``values`` from sorted set ``name`` @@ -4735,7 +4735,7 @@ class HyperlogCommands(CommandsProtocol): see: https://redis.io/topics/data-types-intro#hyperloglogs """ - def pfadd(self, name: KeyT, *values: EncodableT) -> ResponseT: + def pfadd(self, name: KeyT, *values: FieldT) -> ResponseT: """ Adds the specified elements to the specified HyperLogLog. |