Skip to content

Commit

Permalink
fix type of "end"
Browse files Browse the repository at this point in the history
  • Loading branch information
NickyHavoc committed Apr 12, 2024
1 parent 4b801ab commit 1579578
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ def _get_highlights_per_chunk(
if highlight.start < next_start and highlight.end > current_start:
highlights_with_indices_fixed = ScoredTextHighlight(
start=max(0, highlight.start - current_start),
end=min(highlight.end - current_start, next_start),
end=min(highlight.end - current_start, next_start)
if isinstance(next_start, int)
else highlight.end,
score=highlight.score,
)
current_overlaps.append(highlights_with_indices_fixed)
Expand Down

0 comments on commit 1579578

Please sign in to comment.