Skip to content

Commit 43ed1fa

Browse files
committed
style change
1 parent 3fb3195 commit 43ed1fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

redis/commands/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -758,18 +758,18 @@ def command_list(
758758
759759
For more information see https://redis.io/commands/command-list/
760760
"""
761-
pieces = ["FILTERBY"]
761+
pieces = []
762762
if module is not None:
763763
pieces.extend(["MODULE", module])
764764
if category is not None:
765765
pieces.extend(["ACLCAT", category])
766766
if pattern is not None:
767767
pieces.extend(["PATTERN", pattern])
768768

769-
if len(pieces) > 1:
770-
return self.execute_command("COMMAND LIST", *pieces)
769+
if pieces:
770+
pieces.insert(0, "FILTERBY")
771771

772-
return self.execute_command("COMMAND LIST")
772+
return self.execute_command("COMMAND LIST", *pieces)
773773

774774
def command_getkeysandflags(self, *args: List[str]) -> List[Union[str, List[str]]]:
775775
"""

0 commit comments

Comments
 (0)