(value: Any)
| 436 | |
| 437 | |
| 438 | def as_bool(value: Any) -> bool: |
| 439 | if isinstance(value, bool): |
| 440 | return value |
| 441 | if isinstance(value, str): |
| 442 | return value.strip().lower() in {'true', '1', 'yes'} |
| 443 | if isinstance(value, (int, float)): |
| 444 | return bool(value) |
| 445 | return False |
| 446 | |
| 447 | |
| 448 | def normalize_result(result: dict[str, Any]) -> dict[str, Any]: |