MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / require_mapping

Function require_mapping

entity/configs/base.py:217–220  ·  view source on GitHub ↗
(data: Any, path: str)

Source from the content-addressed store, hash-verified

215
216
217def require_mapping(data: Any, path: str) -> Mapping[str, Any]:
218 if not isinstance(data, Mapping):
219 raise ConfigError("expected mapping", path)
220 return data
221
222
223def require_str(data: Mapping[str, Any], key: str, path: str, *, allow_empty: bool = False) -> str:

Callers 15

from_dictMethod · 0.90
from_dictMethod · 0.90
from_dictMethod · 0.90
from_dictMethod · 0.90
from_dictMethod · 0.90
from_dictMethod · 0.90
from_dictMethod · 0.90
from_dictMethod · 0.90
from_dictMethod · 0.90
_normalize_valueMethod · 0.90
from_dictMethod · 0.90
from_dictMethod · 0.90

Calls 1

ConfigErrorClass · 0.85

Tested by

no test coverage detected