()
| 305 | timeout = max(5, int(config.remote_browser_timeout or 60)) |
| 306 | return base_url, api_key, timeout |
| 307 | |
| 308 | |
| 309 | def _build_remote_browser_http_timeout(read_timeout: float) -> Any: |
| 310 | read_value = max(3.0, float(read_timeout)) |
| 311 | write_value = min(10.0, max(3.0, read_value)) |
| 312 | if httpx is None: |
| 313 | return read_value |
| 314 | return httpx.Timeout( |
| 315 | connect=2.5, |
| 316 | read=read_value, |
| 317 | write=write_value, |
| 318 | pool=2.5, |
| 319 | ) |
| 320 | |
| 321 | |
| 322 | def _parse_json_response_text(text: str) -> Optional[Any]: |
| 323 | if not text: |
| 324 | return None |
| 325 | try: |
| 326 | return json.loads(text) |
| 327 | except Exception: |
nothing calls this directly
no outgoing calls
no test coverage detected