MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / as_bool

Function as_bool

scripts/issue_duplicate_check_openhands.py:438–445  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

436
437
438def as_bool(value: Any) -> bool:
439 if isinstance(value, bool):
440 return value
441 if isinstance(value, str):
442 return value.strip().lower() in {'true', '1', 'yes'}
443 if isinstance(value, (int, float)):
444 return bool(value)
445 return False
446
447
448def normalize_result(result: dict[str, Any]) -> dict[str, Any]:

Callers 1

normalize_resultFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected