MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / ObjDictTools

Class ObjDictTools

tools/meta_codegen/framework/scheme.py:737–756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735
736
737class ObjDictTools:
738 @staticmethod
739 def as_obj(dict: Dict) -> object:
740 result = ObjDictTools()
741 result.__dict__ = dict
742 return result
743
744 @staticmethod
745 def as_dict(obj: object) -> Dict:
746 return obj.__dict__
747
748 @staticmethod
749 def to_obj(dict: Dict) -> object:
750 result = ObjDictTools()
751 result.__dict__.update(dict)
752 return result
753
754 @staticmethod
755 def to_dict(obj: object) -> Dict:
756 return obj.__dict__.copy()

Callers 2

as_objMethod · 0.85
to_objMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected