MCPcopy Create free account
hub / github.com/idank/explainshell / _screenshot_with_clip_fallback

Function _screenshot_with_clip_fallback

tests/evals/render/render_eval.py:573–582  ·  view source on GitHub ↗
(
    html_path: Path, png_path: Path, *, timeout_ms: int
)

Source from the content-addressed store, hash-verified

571
572
573def _screenshot_with_clip_fallback(
574 html_path: Path, png_path: Path, *, timeout_ms: int
575) -> None:
576 try:
577 _screenshot_page(html_path, png_path, timeout_ms=timeout_ms)
578 except RuntimeError:
579 print(f" full-page failed, retrying with clip-height {_CLIP_HEIGHT}")
580 _screenshot_page(
581 html_path, png_path, timeout_ms=timeout_ms, clip_height=_CLIP_HEIGHT
582 )
583
584
585def _rel(from_dir: Path, target: Path) -> str:

Callers 1

diff_reportFunction · 0.85

Calls 1

_screenshot_pageFunction · 0.85

Tested by

no test coverage detected