Skip to content

Commit dbc342c

Browse files
committed
fix pr comments
1 parent 0783f05 commit dbc342c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

redis/commands/core.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -3259,7 +3259,7 @@ def bzpopmin(self, keys, timeout=0):
32593259
def bzmpop(
32603260
self,
32613261
timeout: float,
3262-
num_keys: int,
3262+
numkeys: int,
32633263
keys: List[str],
32643264
min: Optional[bool] = False,
32653265
max: Optional[bool] = False,
@@ -3277,15 +3277,14 @@ def bzmpop(
32773277
32783278
For more information check https://redis.io/commands/bzmpop
32793279
"""
3280-
args = [timeout, num_keys, *keys]
3280+
args = [timeout, numkeys, *keys]
32813281
if (min and max) or (not min and not max):
3282-
raise DataError
3282+
raise DataError("Either min or max, but not both must be set")
32833283
elif min:
32843284
args.append("MIN")
32853285
else:
32863286
args.append("MAX")
3287-
if count != 1:
3288-
args.extend(["COUNT", count])
3287+
args.extend(["COUNT", count])
32893288

32903289
return self.execute_command("BZMPOP", *args)
32913290

0 commit comments

Comments
 (0)