Apply a patch (list of edits) to the skill document sequentially. Parameters ---------- skill : str Current skill document content. patch : Patch | dict A :class:`~skillopt.types.Patch` instance or a plain dict with key ``edits`` containing a list of edit ope
(skill: str, patch: PatchType | dict)
| 187 | |
| 188 | |
| 189 | def apply_patch(skill: str, patch: PatchType | dict) -> str: |
| 190 | """Apply a patch (list of edits) to the skill document sequentially. |
| 191 | |
| 192 | Parameters |
| 193 | ---------- |
| 194 | skill : str |
| 195 | Current skill document content. |
| 196 | patch : Patch | dict |
| 197 | A :class:`~skillopt.types.Patch` instance or a plain dict with |
| 198 | key ``edits`` containing a list of edit operations. |
| 199 | """ |
| 200 | updated_skill, _ = apply_patch_with_report(skill, patch) |
| 201 | return updated_skill |
nothing calls this directly
no test coverage detected