From b94e230b17d08e6c89d134e933c706256b79bc4a Mon Sep 17 00:00:00 2001 From: Anas Date: Tue, 30 Nov 2021 18:05:51 +0200 Subject: Added black and isort (#1734) --- redis/commands/helpers.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'redis/commands/helpers.py') diff --git a/redis/commands/helpers.py b/redis/commands/helpers.py index dc5705b..80dfd76 100644 --- a/redis/commands/helpers.py +++ b/redis/commands/helpers.py @@ -22,7 +22,7 @@ def list_or_args(keys, args): def nativestr(x): """Return the decoded binary string, or a string, depending on type.""" r = x.decode("utf-8", "replace") if isinstance(x, bytes) else x - if r == 'null': + if r == "null": return return r @@ -58,14 +58,14 @@ def parse_list_to_dict(response): res = {} for i in range(0, len(response), 2): if isinstance(response[i], list): - res['Child iterators'].append(parse_list_to_dict(response[i])) - elif isinstance(response[i+1], list): - res['Child iterators'] = [parse_list_to_dict(response[i+1])] + res["Child iterators"].append(parse_list_to_dict(response[i])) + elif isinstance(response[i + 1], list): + res["Child iterators"] = [parse_list_to_dict(response[i + 1])] else: try: - res[response[i]] = float(response[i+1]) + res[response[i]] = float(response[i + 1]) except (TypeError, ValueError): - res[response[i]] = response[i+1] + res[response[i]] = response[i + 1] return res -- cgit v1.2.1