Skip to content

Commit

Permalink
Fix blender when line is None
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 14, 2024
1 parent 20626c9 commit 45015ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prospector/blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def blend(messages: list[Message], blend_combos: Optional[list[list[tuple[str, s
msgs_grouped: dict[Path, dict[int, list[Message]]] = defaultdict(lambda: defaultdict(list))

for message in messages:
assert message.location.line is not None
msgs_grouped[message.location.path][message.location.line].append(
line = message.location.line
msgs_grouped[message.location.path][-1 if line is None else line].append(
message,
)

Expand Down

0 comments on commit 45015ad

Please sign in to comment.