diff --git a/redis/client.py b/redis/client.py index 9fd5b7ca9e..6a97f96562 100755 --- a/redis/client.py +++ b/redis/client.py @@ -694,7 +694,7 @@ class AbstractRedis: **string_keys_to_dict( "AUTH COPY EXPIRE EXPIREAT PEXPIRE PEXPIREAT " "HEXISTS HMSET MOVE MSETNX PERSIST " - "PSETEX RENAMENX SISMEMBER SMOVE SETEX SETNX", + "PSETEX RENAMENX SMOVE SETEX SETNX", bool, ), **string_keys_to_dict( diff --git a/redis/commands/core.py b/redis/commands/core.py index af5384e9ef..e8376d6751 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -3350,9 +3350,13 @@ def sinterstore( args = list_or_args(keys, args) return self.execute_command("SINTERSTORE", dest, *args) - def sismember(self, name: str, value: str) -> Union[Awaitable[bool], bool]: + def sismember( + self, name: str, value: str + ) -> Union[Awaitable[Union[Literal[0], Literal[1]]], Union[Literal[0], Literal[1]]]: """ - Return a boolean indicating if ``value`` is a member of set ``name`` + Return whether ``value`` is a member of set ``name``: + - 1 if the value is a member of the set. + - 0 if the value is not a member of the set or if key does not exist. For more information see https://redis.io/commands/sismember """