MCPcopy Create free account
hub / github.com/BeingBeyond/BeTTER / _require_string

Function _require_string

src/task/specs/task_draft_pipeline.py:97–101  ·  view source on GitHub ↗
(payload: Mapping[str, object], key: str)

Source from the content-addressed store, hash-verified

95
96
97def _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

Callers 2

task_draft_from_dictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected