MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / load_object

Function load_object

Utility/Config.py:100–106  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

98
99def asNamespace(dictionary) -> types.SimpleNamespace:
100 def load_object(obj):
101 if isinstance(obj, dict):
102 for k in obj:
103 if obj[k] is None:
104 obj[k] = types.SimpleNamespace()
105 return types.SimpleNamespace(**obj)
106 return obj
107 return json.loads(json.dumps(dictionary), object_hook=load_object)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected