Skip to content

Commit

Permalink
bckfix
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Sep 7, 2024
1 parent e60a912 commit 6573481
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions review_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ def read_data(path, line_start, line_end, value_start, value_end, ground_truth,
multiline_end_offset = 0
elif line_start < line_end:
data_line = '\n'.join(lines[line_start - 1:line_end])
multiline_end_offset = len(data_line) - len(lines[line_end - 1]) + (line_end - line_start)
# check correctness
assert value_start < value_end + multiline_end_offset, (path, line_start, line_end, value_start, value_end)
multiline_end_offset = len(data_line) - len(lines[line_end - 1])
else:
raise RuntimeError(f"Line start must be less than end. {path},{line_start},{line_end}")

Expand Down

0 comments on commit 6573481

Please sign in to comment.