MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / coerce_boolean

Function coerce_boolean

src/opencode_ai/_utils/_utils.py:325–326  ·  view source on GitHub ↗
(val: str)

Source from the content-addressed store, hash-verified

323
324
325def coerce_boolean(val: str) -> bool:
326 return val == "true" or val == "1" or val == "on"
327
328
329def maybe_coerce_integer(val: str | None) -> int | None:

Callers 2

BaseModelClass · 0.85
maybe_coerce_booleanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected