8000 Use enumerate. · mattrobenolt/influxdb-python@60b58d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 60b58d6

Browse files
author
Grégory Starck
committed
Use enumerate.
1 parent ad7159a commit 60b58d6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

influxdb/client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,9 @@ def format_query_response(response):
113113
if 'columns' in row.keys() and 'values' in row.keys():
114114
for value in row['values']:
115115
item = {}
116-
current_col = 0
117-
for field in value:
118-
item[row['columns'][current_col]] = field
119-
current_col += 1
116+
for cur_col, field in enumerate(value):
117+
item[row['columns'][cur_col]] = field
118+
cur_col += 1
120119
items.append(item)
121120
return series
122121

0 commit comments

Comments
 (0)
0