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

Method _parse_switch_step

verifier/AgentVerifier/yaml_parser.py:219–230  ·  view source on GitHub ↗

Parse switch statement

(self, step_data: Dict[str, Any])

Source from the content-addressed store, hash-verified

217 }
218
219 def _parse_switch_step(self, step_data: Dict[str, Any]) -> Dict[str, Any]:
220 """Parse switch statement"""
221 cases = {}
222 for case_value, case_steps in step_data.get("cases", {}).items():
223 cases[case_value] = self._parse_steps_list(case_steps)
224
225 return {
226 "type": "switch",
227 "variable": step_data.get("variable", ""),
228 "cases": cases,
229 "default": self._parse_steps_list(step_data.get("default", [])),
230 }
231
232 def _parse_parallel_step(self, step_data: List[Dict[str, Any]]) -> Dict[str, Any]:
233 """Parse parallel steps"""

Callers 1

_parse_stepMethod · 0.95

Calls 2

_parse_steps_listMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected