mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
fixed condition to check whether a comment was
within the diffs
This commit is contained in:
@ -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 old‐file ranges
|
# 3) Check that comment.from_ lies in at least one of these old‐file ranges
|
||||||
in_any_range = False
|
in_any_range = False
|
||||||
for start, end in old_ranges + new_ranges:
|
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
|
in_any_range = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user