Skip to content

Commit

Permalink
Merge pull request #276 from py-cov-action/error-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ewjoachim authored Sep 26, 2023
2 parents 08f2d84 + a3cf05c commit b00ad82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coverage_comment/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ def parse_diff_output(diff: str) -> dict[pathlib.Path, list[int]]:
current_file = pathlib.Path(line.removeprefix(added_filename_prefix))
continue
if line.startswith("@@"):
assert current_file
if current_file is None:
raise ValueError(f"Unexpected diff output format: \n{diff}")
lines = parse_line_number_diff_line(line)
result.setdefault(current_file, []).extend(lines)
continue
Expand Down

0 comments on commit b00ad82

Please sign in to comment.