(payload: Mapping[str, object], key: str)
| 95 | |
| 96 | |
| 97 | def _require_string(payload: Mapping[str, object], key: str) -> str: |
| 98 | value = payload.get(key) |
| 99 | if not isinstance(value, str): |
| 100 | raise ValueError(f"{key} must be a string.") |
| 101 | return value |
| 102 | |
| 103 | |
| 104 |
no outgoing calls
no test coverage detected