INNER CODE UNIT · Python

format_commands

evalstate/fast-agent · src/fast_agent/cli/main.py:115

    def format_commands(self, ctx: Context, formatter: HelpFormatter) -> None:
        rows = [
            (command_name, self.lazy_subcommand_help[command_name])
            for command_name in self.list_commands(ctx)
        ]
        if rows:
            with formatter.section("Commands"):
                formatter.write_dl(rows)

    def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
        ctx.meta[_ROOT_HELP_CONTEXT_KEY] = True
        try:
            super().format_help(ctx, formatter)
        finally:
            ctx.meta.pop(_ROOT_HELP_CONTEXT_KEY, None)


app = typer.Typer(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…