diff options
Diffstat (limited to 'redis/commands/timeseries/utils.py')
-rw-r--r-- | redis/commands/timeseries/utils.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/redis/commands/timeseries/utils.py b/redis/commands/timeseries/utils.py index c33b7c5..c49b040 100644 --- a/redis/commands/timeseries/utils.py +++ b/redis/commands/timeseries/utils.py @@ -2,9 +2,7 @@ from ..helpers import nativestr def list_to_dict(aList): - return { - nativestr(aList[i][0]): nativestr(aList[i][1]) - for i in range(len(aList))} + return {nativestr(aList[i][0]): nativestr(aList[i][1]) for i in range(len(aList))} def parse_range(response): @@ -16,9 +14,7 @@ def parse_m_range(response): """Parse multi range response. Used by TS.MRANGE and TS.MREVRANGE.""" res = [] for item in response: - res.append( - {nativestr(item[0]): - [list_to_dict(item[1]), parse_range(item[2])]}) + res.append({nativestr(item[0]): [list_to_dict(item[1]), parse_range(item[2])]}) return sorted(res, key=lambda d: list(d.keys())) @@ -34,8 +30,7 @@ def parse_m_get(response): res = [] for item in response: if not item[2]: - res.append( - {nativestr(item[0]): [list_to_dict(item[1]), None, None]}) + res.append({nativestr(item[0]): [list_to_dict(item[1]), None, None]}) else: res.append( { |