Spaces:
Running
Running
File size: 358 Bytes
7d63c70 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | from __future__ import annotations
from typing import Optional
def format_runtime_unavailable_detail(
*,
label: str,
fallback: str,
import_error: Optional[str] = None,
) -> str:
normalized_error = str(import_error or "").strip()
if normalized_error:
return f"{label} is unavailable: {normalized_error}"
return fallback
|