Path 1: 17 calls (0.4)

None (11) 'hello' (2) 'custom' (1) 'nested' (1) 'merged' (1) 'late' (1)

None (12) FlaskGroup def (3) AppGroup def (2)

{} (14) dict (3)

command..decorator def (17)

1def command(self, *args, **kwargs):
2        """This works exactly like the method of the same name on a regular
3        :class:`click.Group` but it wraps callbacks in :func:`with_appcontext`
4        unless it's disabled by passing ``with_appcontext=False``.
5        """
6        wrap_for_ctx = kwargs.pop("with_appcontext", True)
7
8        def decorator(f):
9            if wrap_for_ctx:
10                f = with_appcontext(f)
11            return click.Group.command(self, *args, **kwargs)(f)
12
13        return decorator
            

Path 2: 13 calls (0.3)

() (7) ('hello',) (2) ('custom',) (1) ('nested',) (1) ('merged',) (1) ('late',) (1)

{} (13)

AppGroup.command..decorator def (13)

1def command(self, *args, **kwargs):
2        """This works exactly like the method of the same name on a regular
3        :class:`click.Group` but it wraps callbacks in :func:`with_appcontext`
4        unless it's disabled by passing ``with_appcontext=False``.
5        """
6        wrap_for_ctx = kwargs.pop("with_appcontext", True)
7
8        def decorator(f):
9            if wrap_for_ctx:
10                f = with_appcontext(f)
11            return click.Group.command(self, *args, **kwargs)(f)
12
13        return decorator
            

Path 3: 13 calls (0.3)

() (7) ('hello',) (2) ('custom',) (1) ('nested',) (1) ('merged',) (1) ('late',) (1)

{} (13)

Group.command..decorator def (13)

1def command(self, *args, **kwargs):
2        """This works exactly like the method of the same name on a regular
3        :class:`click.Group` but it wraps callbacks in :func:`with_appcontext`
4        unless it's disabled by passing ``with_appcontext=False``.
5        """
6        wrap_for_ctx = kwargs.pop("with_appcontext", True)
7
8        def decorator(f):
9            if wrap_for_ctx:
10                f = with_appcontext(f)
11            return click.Group.command(self, *args, **kwargs)(f)
12
13        return decorator