MCPcopy Index your code
hub / github.com/idank/explainshell / _coerce_bool

Function _coerce_bool

tools/migrate_mongo_to_sqlite.py:52–59  ·  view source on GitHub ↗
(value, default=False)

Source from the content-addressed store, hash-verified

50
51
52def _coerce_bool(value, default=False):
53 if value is None:
54 return default
55 if isinstance(value, bool):
56 return value
57 if isinstance(value, int):
58 return bool(value)
59 return default
60
61
62def _para_to_store(p):

Callers 1

migrateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected