Skip to content

Commit

Permalink
Merge 8375af4 into 28a7591
Browse files Browse the repository at this point in the history
  • Loading branch information
bmerry committed Aug 26, 2019
2 parents 28a7591 + 8375af4 commit 4dbc549
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fakeredis/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,12 @@ def zremrangebyrank(self, key, start, stop):

@command((Key(ZSet), Int), (bytes, bytes))
def zscan(self, key, cursor, *args):
return self._scan(key.value.items, cursor, *args)
new_cursor, ans = self._scan(key.value.items(), cursor, *args)
flat = []
for (key, score) in ans:
flat.append(key)
flat.append(Float.encode(score, False))
return [new_cursor, flat]

@command((Key(ZSet), bytes))
def zscore(self, key, member):
Expand Down

0 comments on commit 4dbc549

Please sign in to comment.