summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Despoudis <thdespou@hotmail.com>2018-12-04 16:40:51 +0000
committerTheo Despoudis <thdespou@hotmail.com>2018-12-04 16:40:51 +0000
commit4df86b82e78f78f1fd5c010687e5a097df0e0bab (patch)
tree055a8b0111a341cdfe9de2637624fec46f72bede
parentf91a9d522af9eb808f4b692a5fe24d70431ac8c3 (diff)
downloadredis-py-4df86b82e78f78f1fd5c010687e5a097df0e0bab.tar.gz
Fixes codestyle issues
Signed-off-by: Theo Despoudis <thdespou@hotmail.com>
-rwxr-xr-xredis/client.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/redis/client.py b/redis/client.py
index c329ea9..644165c 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -471,7 +471,7 @@ class Redis(object):
{
'CLIENT GETNAME': lambda r: r and nativestr(r),
'CLIENT ID': int,
- 'CLIENT KILL': lambda r: int or nativestr(r) == 'OK',
+ 'CLIENT KILL': lambda r: int or nativestr(r) == 'OK',
'CLIENT LIST': parse_client_list,
'CLIENT SETNAME': bool_ok,
'CLIENT UNBLOCK': lambda r: r and int(r) == 1 or False,
@@ -792,18 +792,20 @@ class Redis(object):
def client_kill_filter(self, *filter_options):
"""
- Disconnects the client using a variety of filter options"
- :param filter_options: a tuple or list of filter options with the following format:
+ Disconnects the client using a variety of filter options
+ :param filter_options: a tuple or list of filter options with
+ the following format:
(filter, value, filter, value,...) or
[filter, value, filter, value,...]
"""
if not isinstance(filter_options, (list, tuple)) or not filter_options:
- raise DataError("CLIENT KILL <filter> <value> ... ... <filter> <value>" +
+ raise DataError("CLIENT KILL <filter> <value> ... ... <filter> "
+ "<value> "
"must be a non empty list or "
"tuple to execute")
if len(filter_options) % 2 != 0:
- raise DataError("CLIENT KILL <filter> <value> requires a filter and a value pair. Got %r" % (
- filter_options,))
+ raise DataError("CLIENT KILL <filter> <value> requires a filter "
+ "and a value pair. Got %r" % (filter_options,))
filter_types = ('addr', 'id', 'type', 'skipme')
client_types = ('normal', 'master', 'slave', 'pubsub')
yes_no = ('yes', 'no')
@@ -814,11 +816,11 @@ class Redis(object):
raise DataError("CLIENT KILL <filter> must be one of %r" % (
filter_types,))
if key == 'type' and value not in client_types:
- raise DataError("CLIENT KILL TYPE <value> must be one of %r" % (
- client_types,))
+ raise DataError("CLIENT KILL TYPE <value> "
+ "must be one of %r" % (client_types,))
if key == 'skipme' and value not in yes_no:
- raise DataError("CLIENT KILL SKIPME <value> must be one of %r" % (
- yes_no,))
+ raise DataError("CLIENT KILL SKIPME <value> "
+ "must be one of %r" % (yes_no,))
return self.execute_command('CLIENT KILL', *filter_options)
def client_list(self, _type=None):