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

Method link_subcomponents

scratchattach/editor/block.py:72–81  ·  view source on GitHub ↗

Iterate through subcomponents and assign the 'block' attribute

(self)

Source from the content-addressed store, hash-verified

70 return f"Block<{self.opcode!r}>"
71
72 def link_subcomponents(self):
73 """
74 Iterate through subcomponents and assign the 'block' attribute
75 """
76 if self.mutation:
77 self.mutation.block = self
78
79 for iterable in (self.fields.values(), self.inputs.values()):
80 for subcomponent in iterable:
81 subcomponent.block = self
82
83 def add_input(self, name: str, _input: inputs.Input) -> Self:
84 """

Callers 3

__init__Method · 0.95
link_using_spriteMethod · 0.95
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected