MCPcopy Index your code
hub / github.com/Standard-Intelligence/hertz-dev / truthyexists

Function truthyexists

utils/blocks.py:72–73  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

70 return not exists(v)
71
72def truthyexists(v):
73 return exists(v) and v is not False
74
75def truthyattr(obj, attr):
76 return hasattr(obj, attr) and truthyexists(getattr(obj, attr))

Callers 1

truthyattrFunction · 0.85

Calls 1

existsFunction · 0.85

Tested by

no test coverage detected