MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / from_json

Method from_json

scratchattach/editor/extension.py:26–32  ·  view source on GitHub ↗
(data: str)

Source from the content-addressed store, hash-verified

24
25 @staticmethod
26 def from_json(data: str):
27 assert isinstance(data, str)
28 _extension = Extensions.find(data, "code")
29 if _extension is None:
30 _extension = Extension(data)
31
32 return _extension
33
34 def to_json(self) -> str:
35 return self.code

Callers

nothing calls this directly

Calls 2

ExtensionClass · 0.85
findMethod · 0.45

Tested by

no test coverage detected