Skip to content

Commit

Permalink
fix errors checked by pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
s1mple-child committed Jan 5, 2024
1 parent 4e65891 commit 25ec443
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gerrit/gerrit_review_info_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def parse_json_from_file(json_file_full_path):
"""
json_data = []
# get every line of json file
for line in open(json_file_full_path, 'rb'):
json_data.append(json.loads(line))
with open(json_file_full_path, 'rb') as file_handler:
for line in file_handler:
json_data.append(json.loads(line))

return json_data

Expand Down Expand Up @@ -152,7 +153,7 @@ def write_result_lists_to_target(start_date, end_date, reviewed_date_list, patch

# because all given lists have same length, select one of them and itearate all given lists
for i, key in enumerate(reviewed_file_list):
if formatted_start_date <= key <= formatted_end_date:
if formatted_start_date <= reviewed_date_list[i] <= formatted_end_date:
print('Writing review data to target excel which sheet name is Review Info. The ref is ' + patch_set_num_list[i])
# create pandas dataframe
df = pd.DataFrame({'review message': [reviewed_messages_list[i]],
Expand Down

0 comments on commit 25ec443

Please sign in to comment.