(value: Any, default: bool = False)
| 41 | |
| 42 | |
| 43 | def _coerce_bool(value: Any, default: bool = False) -> bool: |
| 44 | if value is None: |
| 45 | return default |
| 46 | if isinstance(value, bool): |
| 47 | return value |
| 48 | if isinstance(value, str): |
| 49 | return value.strip().lower() in {"1", "true", "yes", "on"} |
| 50 | return bool(value) |
| 51 | |
| 52 | |
| 53 | def _as_mapping(value: Any) -> Mapping[str, Any]: |
no outgoing calls
no test coverage detected