MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / as_bool

Function as_bool

experiments/human_eval/build_main_human_eval_packet.py:60–65  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

58
59
60def as_bool(value: Any) -> bool:
61 if isinstance(value, bool):
62 return value
63 if isinstance(value, (int, float)):
64 return bool(value)
65 return str(value).strip().lower() in {"1", "true", "yes", "y"}
66
67
68def truncate(value: Any, limit: int) -> str:

Callers 2

collect_method_episodesFunction · 0.85
build_rowsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected