(
start_line: int,
end_line: Optional[int],
replacement: Optional[str],
)
| 935 | |
| 936 | |
| 937 | def _build_single_edit( |
| 938 | start_line: int, |
| 939 | end_line: Optional[int], |
| 940 | replacement: Optional[str], |
| 941 | ) -> List[Mapping[str, Any]]: |
| 942 | effective_end = end_line if end_line is not None else start_line |
| 943 | payload = { |
| 944 | "start_line": start_line, |
| 945 | "end_line": effective_end, |
| 946 | "replacement": replacement if replacement is not None else "", |
| 947 | } |
| 948 | return [payload] |
| 949 | |
| 950 | |
| 951 | def _validate_edit_ranges(edits: Sequence[TextEdit]) -> None: |