MCPcopy Create free account
hub / github.com/microsoft/SkillOpt / _edit_fields

Function _edit_fields

skillopt/optimizer/skill.py:76–82  ·  view source on GitHub ↗
(edit: EditType | dict)

Source from the content-addressed store, hash-verified

74
75
76def _edit_fields(edit: EditType | dict) -> tuple[str, str, str]:
77 op = edit.op if hasattr(edit, "op") else edit.get("op", "")
78 content = _strip_slow_update_markers(
79 (edit.content if hasattr(edit, "content") else edit.get("content", "")).strip()
80 )
81 target = edit.target if hasattr(edit, "target") else edit.get("target", "")
82 return op, content, target
83
84
85def _apply_edit_with_report(skill: str, edit: EditType | dict) -> tuple[str, dict]:

Callers 1

_apply_edit_with_reportFunction · 0.85

Calls 2

getMethod · 0.80

Tested by

no test coverage detected