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

Function _normalize_image_paths

src/webwright/tools/image_qa.py:44–54  ·  view source on GitHub ↗
(
    *,
    image_path: Path | None = None,
    image_paths: list[Path] | tuple[Path, ...] | None = None,
)

Source from the content-addressed store, hash-verified

42
43
44def _normalize_image_paths(
45 *,
46 image_path: Path | None = None,
47 image_paths: list[Path] | tuple[Path, ...] | None = None,
48) -> list[Path]:
49 normalized = list(image_paths or [])
50 if image_path is not None:
51 normalized.insert(0, image_path)
52 if not normalized:
53 raise ValueError("At least one image path is required.")
54 return normalized
55
56
57def _parse_json_response(raw_text: str) -> dict[str, Any]:

Callers 1

run_image_qaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected