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

Method from_json

scratchattach/editor/backpack_json.py:44–53  ·  view source on GitHub ↗
(data: dict[str, str])

Source from the content-addressed store, hash-verified

42
43 @staticmethod
44 def from_json(data: dict[str, str]) -> inputs.Input:
45 # The actual data is stored in a separate prim block
46 _id = data.get("shadow")
47 _obscurer_id = data.get("block")
48
49 if _obscurer_id == _id:
50 # If both the shadow and obscurer are the same, then there is no actual obscurer
51 _obscurer_id = None
52 # We cannot work out the shadow status yet since that is located in the primitive
53 return inputs.Input(None, _id=_id, _obscurer_id=_obscurer_id)
54
55
56class BpBlock(block.Block):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected