MCPcopy Create free account
hub / github.com/Standard-Intelligence/hertz-dev / truthyattr

Function truthyattr

utils/blocks.py:75–76  ·  view source on GitHub ↗
(obj, attr)

Source from the content-addressed store, hash-verified

73 return exists(v) and v is not False
74
75def truthyattr(obj, attr):
76 return hasattr(obj, attr) and truthyexists(getattr(obj, attr))
77
78defaultT = TypeVar('defaultT')
79

Callers

nothing calls this directly

Calls 1

truthyexistsFunction · 0.85

Tested by

no test coverage detected