(payload: dict[str, Any], key: str, context: str)
| 128 | |
| 129 | |
| 130 | def _require_list(payload: dict[str, Any], key: str, context: str) -> list[Any]: |
| 131 | value = payload.get(key) |
| 132 | if not isinstance(value, list): |
| 133 | raise ContractError(f"{context}.{key}: expected an array") |
| 134 | return value |
| 135 | |
| 136 | |
| 137 | def _require_str(payload: dict[str, Any], key: str, context: str) -> str: |
no test coverage detected