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

Function _safe_int

src/webwright/models/base.py:153–157  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

151
152
153def _safe_int(value: Any) -> int:
154 try:
155 return int(value)
156 except (TypeError, ValueError):
157 return 0
158
159
160def _request_metrics_from_serialized_input(serialized_input: list[dict[str, Any]]) -> dict[str, int]:

Calls

no outgoing calls

Tested by

no test coverage detected