Support prefixes for InputGroups
This commit is contained in:
parent
852823af30
commit
66ade0a739
4 changed files with 83 additions and 34 deletions
|
|
@ -1,4 +1,13 @@
|
|||
class InputGroup:
|
||||
class _InputGroupMeta(type):
|
||||
def __getitem__(cls, args):
|
||||
if isinstance(args, str):
|
||||
class PrefixedInputGroup(InputGroup):
|
||||
prefix = args
|
||||
PrefixedInputGroup.__annotations__ = cls.__annotations__
|
||||
return PrefixedInputGroup
|
||||
return cls
|
||||
|
||||
class InputGroup(metaclass=_InputGroupMeta):
|
||||
"""
|
||||
A group of inputs that will be expanded in the node tree.
|
||||
|
||||
|
|
|
|||
Reference in a new issue