fixed condition to check whether a comment was

within the diffs
This commit is contained in:
Karma Riuk
2025-06-03 13:39:02 +02:00
parent 792195e33c
commit 6110640a6f

View File

@ -212,7 +212,9 @@ def ensure_comments_within_diffs(comments: list[Comment], diffs_before: dict[str
# 3) Check that comment.from_ lies in at least one of these oldfile ranges
in_any_range = False
for start, end in old_ranges + new_ranges:
if comment.from_ is not None and start <= comment.from_ <= end:
if (
comment.from_ is not None and start <= comment.from_ <= end
) or start <= comment.to <= end:
in_any_range = True
break