diff --git a/typer/core.py b/typer/core.py index 6868ab4355..8deda313b0 100644 --- a/typer/core.py +++ b/typer/core.py @@ -1214,4 +1214,4 @@ def format_help(self, ctx: _click.Context, formatter: _click.HelpFormatter) -> N def list_commands(self, ctx: _click.Context) -> list[str]: """Returns a list of subcommand names, maintaining the original order of creation (cf Issue #933)""" - return [n for n, c in self.commands.items()] + return list(self.commands)