Commit ca65b3df authored by ∞'s avatar 💻

Add convenience BaseGroup.add_group() for subgrousp

parent 4a996a42
Pipeline #1883 passed with stages
in 35 seconds
...@@ -78,6 +78,10 @@ class BaseGroup(collections.OrderedDict): ...@@ -78,6 +78,10 @@ class BaseGroup(collections.OrderedDict):
self[cb.__name__] = Callable.for_callback(cb) self[cb.__name__] = Callable.for_callback(cb)
return self return self
def add_group(self, name, *args, **kwargs):
self[name] = Group(name, *args, **kwargs)
return self[name]
@classmethod @classmethod
def factory(cls, module_name): def factory(cls, module_name):
doc = Importable.factory(module_name).doc doc = Importable.factory(module_name).doc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment