(value: Any)
| 58 | |
| 59 | |
| 60 | def as_bool(value: Any) -> bool: |
| 61 | if isinstance(value, bool): |
| 62 | return value |
| 63 | if isinstance(value, (int, float)): |
| 64 | return bool(value) |
| 65 | return str(value).strip().lower() in {"1", "true", "yes", "y"} |
| 66 | |
| 67 | |
| 68 | def truncate(value: Any, limit: int) -> str: |
no outgoing calls
no test coverage detected