Skip to content

Commit 01b0d27

Browse files
authored
Hoist header[1:]
1 parent 88e6a29 commit 01b0d27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/test/Analysis/csv2json.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def csv_to_json_dict(csv_filepath):
5959
return
6060

6161
header_length = len(header)
62+
other_column_names = header[1:]
6263

6364
data_dict = {}
6465

@@ -70,7 +71,7 @@ def csv_to_json_dict(csv_filepath):
7071
key = row[0]
7172
value_map = {}
7273

73-
for i, col_name in enumerate(header[1:]):
74+
for i, col_name in enumerate(other_column_names):
7475
# +1 to skip the first column
7576
value_map[col_name] = row[i + 1].strip()
7677

0 commit comments

Comments
 (0)