Skip to content

Commit

Permalink
Remove unnecessary parentheses.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchapman committed Sep 9, 2024
1 parent 33235a2 commit c5360f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/bout_v6_coordinates_upgrader.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def use_metric_accessors(original_string):
lines_to_remove = indices_of_matching_lines(pattern_setting_metric_component, lines)
lines_removed_count = 0
for line_index in lines_to_remove:
del (lines[line_index - lines_removed_count])
del lines[line_index - lines_removed_count]
lines_removed_count += 1
metric_components_with_value = {key: value for key, value in metric_components.items() if value is not None}
newline_inserted = False
Expand All @@ -97,7 +97,7 @@ def use_metric_accessors(original_string):
f" coord->setMetricTensor(ContravariantMetricTensor(g11, g22, g33, g12, g13, g23),\n"
f" CovariantMetricTensor(g_11, g_22, g_33, g_12, g_13, g_23));")
lines.insert(lines_to_remove[0] + len(metric_components_with_value) + 2, new_metric_tensor_setter)
del (lines[lines_to_remove[-1] + 3])
del lines[lines_to_remove[-1] + 3]
return lines


Expand All @@ -109,7 +109,7 @@ def remove_geometry_calls(lines):
# If both the lines above and below are blank then remove one of them
if lines[line_index - 1].strip() == "" and lines[line_index + 1].strip() == "":
del lines[line_index + 1]
del (lines[line_index])
del lines[line_index]
return lines


Expand Down

0 comments on commit c5360f6

Please sign in to comment.