def get_help_option(self, ctx):
    from .core import format_help
    'Override for showing formatted main help via --help and -h options'
    help_options = self.get_help_option_names(ctx)
    if ((not help_options) or (not self.add_help_option)):
        return

    def show_help(ctx, param, value):
        if (value and (not ctx.resilient_parsing)):
            if (not ctx.invoked_subcommand):
                echo(format_help(ctx.get_help()))
            else:
                echo(ctx.get_help(), color=ctx.color)
            ctx.exit()
    return Option(help_options, is_flag=True, is_eager=True, expose_value=False, callback=show_help, help='Show this message and exit.')
def get_help_option(self, ctx):
    from .core import format_help
    'Override for showing formatted main help via --help and -h options'
    help_options = self.get_help_option_names(ctx)
    if ((not help_options) or (not self.add_help_option)):
        return

    def show_help(ctx, param, value):
        if (value and (not ctx.resilient_parsing)):
            if (not ctx.invoked_subcommand):
                echo(format_help(ctx.get_help()))
            else:
                echo(ctx.get_help(), color=ctx.color)
            ctx.exit()
    return Option(help_options, is_flag=True, is_eager=True, expose_value=False, callback=show_help, help='Show this message and exit.')