(value: object, where: str)
| 1302 | |
| 1303 | |
| 1304 | def _require_mapping(value: object, where: str) -> dict[str, object]: |
| 1305 | if not isinstance(value, Mapping): |
| 1306 | raise RouteBundleConfigError(f"{where} must be a mapping") |
| 1307 | result: dict[str, object] = {} |
| 1308 | for key, item in value.items(): |
| 1309 | if not isinstance(key, str): |
| 1310 | raise RouteBundleConfigError(f"{where} keys must be strings") |
| 1311 | result[key] = item |
| 1312 | return result |
| 1313 | |
| 1314 | |
| 1315 | def _optional_mapping(value: object, where: str) -> dict[str, object]: |
no test coverage detected