From 5307679e861608e6402708e86b51d0f79d9d9dd4 Mon Sep 17 00:00:00 2001 From: Vizonex Date: Fri, 19 Jun 2026 13:36:48 -0500 Subject: [PATCH] optimize TyperGroup.list_commands --- typer/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)