← Về thư mục
scripts/ars_apply_revision_patch.py
- _ratio_threshold · function · L89-L104 — def _ratio_threshold(raw: str) -> float
- ApplyRejection · class · L107-L112 — class ApplyRejection(Exception)
- init · method · L110-L112 — def init(self, failures: list[dict])
- StructuralRefusal · class · L115-L120 — class StructuralRefusal(Exception)
- init · method · L118-L120 — def init(self, flags: dict)
- _fail · function · L123-L126 — def _fail(failures: list[dict], op_index: int | None, kind: str, message: str, **extra) -> None
- _load_patch_schema · function · L129-L130 — def _load_patch_schema() -> dict
- validate_patch · function · L133-L292 — def validate_patch( patch: dict, base_raw: bytes, base: ParsedDocument, *, touched_ratio_threshold: float | None, ) -> dict
- _render_segments · function · L295-L318 — def _render_segments( new_text: str, segments: list[Block], *, first_keeps_marker: bool, fresh_ids: list[str], ) -> str
- apply_patch · function · L321-L491 — def apply_patch(base_text: str, base: ParsedDocument, analysis: dict) -> tuple[str, dict]
- _take_fresh · function · L340-L349 — def _take_fresh(op_index: int, seg_indexes: list[int]) -> list[str]
- run · function · L494-L617 — def run( base_path: Path, patch_path: Path, output_path: Path, report_path: Path, *, acknowledge_structural: bool, touched_ratio_threshold: float | None, ) -> dict
- main · function · L620-L687 — def main(argv: list[str] | None = None) -> int