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

Function _resolve_image_path

src/webwright/tools/self_reflection.py:72–80  ·  view source on GitHub ↗
(image_path: str, workspace_dir: str = "")

Source from the content-addressed store, hash-verified

70# ---------------------------------------------------------------------------
71
72def _resolve_image_path(image_path: str, workspace_dir: str = "") -> Path:
73 path = Path(image_path)
74 if not path.is_absolute():
75 base_dir = Path(workspace_dir) if workspace_dir else Path.cwd()
76 path = base_dir / path
77 path = path.resolve()
78 if not path.exists():
79 raise FileNotFoundError(f"Image path does not exist: {path}")
80 return path
81
82
83def _final_execution_sort_key(name: str) -> tuple[int, str]:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected