Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed Aug 21, 2024
1 parent 96e9ad7 commit 7393626
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions typer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ def format_help(self, ctx: click.Context, formatter: click.HelpFormatter) -> Non
markup_mode=self.rich_markup_mode,
)

def list_commands(self, ctx: click.Context) -> list[str]:
def list_commands(self, ctx: click.Context) -> List[str]:
"""Returns a list of subcommand names.
Note that in Click's Group class, these are sorted.
In Typer, we wish to maintain the original order of creation (cf Issue #933)"""
return self.commands
Note that in Click's Group class, these are sorted.
In Typer, we wish to maintain the original order of creation (cf Issue #933)"""
return [n for n, c in self.commands.items()]

0 comments on commit 7393626

Please sign in to comment.