Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep pace with redis-py for zrevrange method #215

Merged
merged 1 commit into from
Sep 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions fakeredis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1825,19 +1825,19 @@ def zlexcount(self, name, min, max):
found += 1
return found

def zrevrange(self, name, start, num, withscores=False, score_cast_func=float):
def zrevrange(self, name, start, end, withscores=False, score_cast_func=float):
"""
Return a range of values from sorted set ``name`` between
``start`` and ``num`` sorted in descending order.
``start`` and ``end`` sorted in descending order.

``start`` and ``num`` can be negative, indicating the end of the range.
``start`` and ``end`` can be negative, indicating the end of the range.

``withscores`` indicates to return the scores along with the values
The return type is a list of (value, score) pairs

``score_cast_func`` a callable used to cast the score return value
"""
return self.zrange(name, start, num, True, withscores, score_cast_func)
return self.zrange(name, start, end, True, withscores, score_cast_func)

def zrevrangebyscore(self, name, max, min, start=None, num=None,
withscores=False, score_cast_func=float):
Expand Down