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

Function asNamespace

Utility/Config.py:99–107  ·  view source on GitHub ↗
(dictionary)

Source from the content-addressed store, hash-verified

97
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 4

MACVO.pyFile · 0.90
TartanVO.pyFile · 0.90
build_dynamic_configFunction · 0.85
load_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected