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

Method read_idcomponent

scratchattach/editor/sprite.py:269–273  ·  view source on GitHub ↗
(attr_name: str, cls: type[base.IDComponent])

Source from the content-addressed store, hash-verified

267
268 # Read VLB
269 def read_idcomponent(attr_name: str, cls: type[base.IDComponent]):
270 _vlbs = []
271 for _vlb_id, _vlb_data in data.get(attr_name, {}).items():
272 _vlbs.append(cls.from_json((_vlb_id, _vlb_data)))
273 return _vlbs
274
275 _variables = read_idcomponent("variables", vlb.Variable)
276 _lists = read_idcomponent("lists", vlb.List)

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
from_jsonMethod · 0.45

Tested by

no test coverage detected