MCPcopy Create free account
hub / github.com/microsoft/Webwright / _parse_final_verdict

Function _parse_final_verdict

src/webwright/tools/self_reflection.py:283–291  ·  view source on GitHub ↗
(response: str)

Source from the content-addressed store, hash-verified

281
282
283def _parse_final_verdict(response: str) -> int | None:
284 matches = list(re.finditer(r"(?i)status:\s*", response))
285 if not matches:
286 return None
287 tail = response[matches[-1].end():].strip()
288 m = re.match(r"""^[\'\"“”‘’\s]*(success|failure)\b""", tail, re.IGNORECASE)
289 if not m:
290 return None
291 return 1 if m.group(1).lower() == "success" else 0
292
293
294# ---------------------------------------------------------------------------

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected