Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions codeflash/languages/java/instrumentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

from __future__ import annotations

import bisect
import logging
import re
from bisect import bisect_right as _bisect_right
from typing import TYPE_CHECKING

if TYPE_CHECKING:
Expand Down Expand Up @@ -235,7 +235,7 @@ def _collect_calls(node, wrapper_bytes, body_bytes, prefix_len, func_name, analy

def _byte_to_line_index(byte_offset: int, line_byte_starts: list[int]) -> int:
"""Map a byte offset in body_text to a body_lines index."""
idx = bisect.bisect_right(line_byte_starts, byte_offset) - 1
idx = _bisect_right(line_byte_starts, byte_offset) - 1
return max(0, idx)


Expand Down
Loading