Skip to content

Commit 45015ad

Browse files
committed
Fix blender when line is None
1 parent 20626c9 commit 45015ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

prospector/blender.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def blend(messages: list[Message], blend_combos: Optional[list[list[tuple[str, s
8888
msgs_grouped: dict[Path, dict[int, list[Message]]] = defaultdict(lambda: defaultdict(list))
8989

9090
for message in messages:
91-
assert message.location.line is not None
92-
msgs_grouped[message.location.path][message.location.line].append(
91+
line = message.location.line
92+
msgs_grouped[message.location.path][-1 if line is None else line].append(
9393
message,
9494
)
9595

0 commit comments

Comments
 (0)