Skip to content

Commit

Permalink
Merge pull request #215 from da2018/master
Browse files Browse the repository at this point in the history
keep pace with redis-py for zrevrange method
  • Loading branch information
bmerry committed Sep 11, 2018
2 parents eb2eb27 + 310cfb1 commit b87e885
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit b87e885

Please sign in to comment.