Apply a single edit operation to the skill document. Parameters ---------- skill : str Current skill document content. edit : Edit | dict An :class:`~skillopt.types.Edit` instance or a plain dict with keys ``op``, ``content``, ``target``. Edits targeting
(skill: str, edit: EditType | dict)
| 146 | |
| 147 | |
| 148 | def apply_edit(skill: str, edit: EditType | dict) -> str: |
| 149 | """Apply a single edit operation to the skill document. |
| 150 | |
| 151 | Parameters |
| 152 | ---------- |
| 153 | skill : str |
| 154 | Current skill document content. |
| 155 | edit : Edit | dict |
| 156 | An :class:`~skillopt.types.Edit` instance or a plain dict with |
| 157 | keys ``op``, ``content``, ``target``. |
| 158 | |
| 159 | Edits targeting the protected slow-update region are silently skipped. |
| 160 | """ |
| 161 | updated_skill, _ = _apply_edit_with_report(skill, edit) |
| 162 | return updated_skill |
| 163 | |
| 164 | |
| 165 | def apply_patch_with_report( |
nothing calls this directly
no test coverage detected