AppGroups produce more AppGroups

This commit is contained in:
Armin Ronacher 2014-08-28 09:35:06 +02:00
parent 9641f07d91
commit a94e767acb

View file

@ -226,6 +226,14 @@ class AppGroup(click.Group):
return click.Group.command(self, *args, **kwargs)(f)
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):
"""Special subclass of the the :class:`AppGroup` group that supports