Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshinishio committed Mar 19, 2024
1 parent 7fe32c0 commit 5118cdd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions utils/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def correct_hunk_headers(diff_text: str) -> str:

# Correct the hunk header if match is not None
l1, _s1, l2, _s2 = (int(x) if x is not None else 0 for x in match.groups())
print(f"{l1=}, {_s1=}, {l2=}, {_s2=}")
s1_actual, s2_actual = 0, 0
i += 1

Expand All @@ -117,13 +116,10 @@ def correct_hunk_headers(diff_text: str) -> str:
i += 1

# Update the hunk header with actual numbers
print(f"{s1_actual=}, {s2_actual=}")
updated_hunk_header: str = f'@@ -{l1},{s1_actual} +{l2},{s2_actual} @@'
updated_lines.append(updated_hunk_header)
updated_lines.extend(lines[start_index:i])

output: str = '\n'.join(updated_lines)
print(f"{output=}\n")
return '\n'.join(updated_lines)


Expand Down

0 comments on commit 5118cdd

Please sign in to comment.