forked from orbit-oss/flask
AppGroups produce more AppGroups
This commit is contained in:
parent
9641f07d91
commit
a94e767acb
1 changed files with 8 additions and 0 deletions
|
|
@ -226,6 +226,14 @@ class AppGroup(click.Group):
|
||||||
return click.Group.command(self, *args, **kwargs)(f)
|
return click.Group.command(self, *args, **kwargs)(f)
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
def group(self, *args, **kwargs):
|
||||||
|
"""This works exactly like the method of the same name on a regular
|
||||||
|
:class:`click.Group` but it defaults the group class to
|
||||||
|
:class:`AppGroup`.
|
||||||
|
"""
|
||||||
|
kwargs.setdefault('cls', AppGroup)
|
||||||
|
return click.Group.group(self, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class FlaskGroup(AppGroup):
|
class FlaskGroup(AppGroup):
|
||||||
"""Special subclass of the the :class:`AppGroup` group that supports
|
"""Special subclass of the the :class:`AppGroup` group that supports
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue