Skip to content

Commit 2d0c9ba

Browse files
authored
Remove unused parse_list_to_dict function from helpers (#3733)
1 parent 8083505 commit 2d0c9ba

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

redis/commands/helpers.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,26 +72,6 @@ def parse_to_list(response):
7272
return res
7373

7474

75-
def parse_list_to_dict(response):
76-
res = {}
77-
for i in range(0, len(response), 2):
78-
if isinstance(response[i], list):
79-
res["Child iterators"].append(parse_list_to_dict(response[i]))
80-
try:
81-
if isinstance(response[i + 1], list):
82-
res["Child iterators"].append(parse_list_to_dict(response[i + 1]))
83-
except IndexError:
84-
pass
85-
elif isinstance(response[i + 1], list):
86-
res["Child iterators"] = [parse_list_to_dict(response[i + 1])]
87-
else:
88-
try:
89-
res[response[i]] = float(response[i + 1])
90-
except (TypeError, ValueError):
91-
res[response[i]] = response[i + 1]
92-
return res
93-
94-
9575
def random_string(length=10):
9676
"""
9777
Returns a random N character long string.

0 commit comments

Comments
 (0)