Skip to content

Commit a94e767

Browse files
committed
AppGroups produce more AppGroups
1 parent 9641f07 commit a94e767

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

flask/cli.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@ def decorator(f):
226226
return click.Group.command(self, *args, **kwargs)(f)
227227
return decorator
228228

229+
def group(self, *args, **kwargs):
230+
"""This works exactly like the method of the same name on a regular
231+
:class:`click.Group` but it defaults the group class to
232+
:class:`AppGroup`.
233+
"""
234+
kwargs.setdefault('cls', AppGroup)
235+
return click.Group.group(self, *args, **kwargs)
236+
229237

230238
class FlaskGroup(AppGroup):
231239
"""Special subclass of the the :class:`AppGroup` group that supports

0 commit comments

Comments
 (0)