Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def custom_block(spec, input_names, defaults):
    input_names = list(input_names)
    parts = list(parse_spec(spec, defaults))
    for part in parts:
        if isinstance(part, kurt.Insert):
            part.name = input_names.pop(0)
    return kurt.CustomBlockType("stack", parts)
        


src/k/u/kurt-2.0.5/kurt/scratch20/__init__.py   kurt(Download)
from kurt.plugin import Kurt, KurtPlugin
 
from kurt.scratch20.blocks import make_block_types, custom_block, make_spec
 
 
                if block_array[0] == 'procDef':
                    (_, spec, input_names, defaults, is_atomic) = block_array
                    cb = custom_block(spec, input_names, defaults)
                    cb.is_atomic = is_atomic
                    self.custom_blocks[spec] = cb

src/k/u/kurt-HEAD/kurt/scratch20/__init__.py   kurt(Download)
from kurt.plugin import Kurt, KurtPlugin
 
from kurt.scratch20.blocks import make_block_types, custom_block, make_spec
 
 
                if block_array[0] == 'procDef':
                    (_, spec, input_names, defaults, is_atomic) = block_array
                    cb = custom_block(spec, input_names, defaults)
                    cb.is_atomic = is_atomic
                    self.custom_blocks[spec] = cb