summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authormathieu longtin <mathieu.longtin@nuance.com>2014-03-19 09:38:04 -0400
committermathieu longtin <mathieu.longtin@nuance.com>2014-03-19 09:38:04 -0400
commit1b224493ea7729a2755a31a2c8ac8e77effb6976 (patch)
tree37a45bb47498e4711204b617bbbf7ee143acc468 /redis/client.py
parente4c8c0ba50d28fb5903ebe2ada4394ea86f8a96a (diff)
downloadredis-py-1b224493ea7729a2755a31a2c8ac8e77effb6976.tar.gz
Fix for pep8
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/redis/client.py b/redis/client.py
index 2c1aecd..001f942 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -1193,17 +1193,17 @@ class StrictRedis(object):
pieces.extend(['COUNT', count])
return self.execute_command('SCAN', *pieces)
- def scan_iter(self,match=None,count=None):
+ def scan_iter(self, match=None, count=None):
"""
Make a iterator using scan.
-
+
``match`` allows for filtering the keys by pattern
``count`` allows for hint the minimum number of returns
"""
cursor = 0
while cursor != '0':
- cursor,data = self.scan(cursor=cursor,match=match,count=count)
+ cursor, data = self.scan(cursor=cursor, match=match, count=count)
for _ in data:
yield _
@@ -1225,14 +1225,15 @@ class StrictRedis(object):
def sscan_iter(self, name, match=None, count=None):
"""
Make a iterator using sscan. Iterates over set members.
-
+
``match`` allows for filtering the keys by pattern
``count`` allows for hint the minimum number of returns
"""
cursor = 0
while cursor != '0':
- cursor,data = self.sscan(name, cursor=cursor, match=match, count=count)
+ cursor, data = self.sscan(name, cursor=cursor,
+ match=match, count=count)
for _ in data:
yield _
@@ -1254,14 +1255,15 @@ class StrictRedis(object):
def hscan_iter(self, name, match=None, count=None):
"""
Make a iterator using hscan. Iterates over key/value pairs.
-
+
``match`` allows for filtering the keys by pattern
``count`` allows for hint the minimum number of returns
"""
cursor = 0
while cursor != '0':
- cursor,data = self.hscan(name, cursor=cursor, match=match, count=count)
+ cursor, data = self.hscan(name, cursor=cursor,
+ match=match, count=count)
for _ in data.items():
yield _
@@ -1283,12 +1285,12 @@ class StrictRedis(object):
pieces.extend(['COUNT', count])
options = {'score_cast_func': score_cast_func}
return self.execute_command('ZSCAN', *pieces, **options)
-
+
def zscan_iter(self, name, match=None, count=None,
score_cast_func=float):
"""
Make a iterator using zscan. Iterates over key/score pairs.
-
+
``match`` allows for filtering the keys by pattern
``count`` allows for hint the minimum number of returns
@@ -1297,7 +1299,9 @@ class StrictRedis(object):
"""
cursor = 0
while cursor != '0':
- cursor,data = self.zscan(name, cursor=cursor, match=match, count=count, score_cast_func=score_cast_func)
+ cursor, data = self.zscan(name, cursor=cursor, match=match,
+ count=count,
+ score_cast_func=score_cast_func)
for _ in data:
yield _