MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / extract_template_vars

Function extract_template_vars

verifier/AgentVerifier/WorkflowToLean.py:247–251  ·  view source on GitHub ↗

Extract {{var}} or {{var.field}} references from a string.

(text: str)

Source from the content-addressed store, hash-verified

245# ============================================================================
246
247def extract_template_vars(text: str) -> list[str]:
248 """Extract {{var}} or {{var.field}} references from a string."""
249 if not text:
250 return []
251 return sorted(set(re.findall(r'\{\{(\w+)(?:\.\w+)*\}\}', text)))
252
253
254def determine_write_type(yaml_key: str) -> str:

Callers 3

_extract_condition_varsFunction · 0.85
parse_body_stepsFunction · 0.85
parse_task_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected