Skip to content

Commit

Permalink
馃帹 Fix type annotations for get_group (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Jul 17, 2022
1 parent e91630d commit d014dd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions typer/main.py
Expand Up @@ -328,7 +328,7 @@ def __call__(self, *args: Any, **kwargs: Any) -> Any:
raise e


def get_group(typer_instance: Typer) -> click.Command:
def get_group(typer_instance: Typer) -> TyperGroup:
group = get_group_from_info(
TyperInfo(typer_instance),
pretty_exceptions_short=typer_instance.pretty_exceptions_short,
Expand All @@ -347,7 +347,7 @@ def get_command(typer_instance: Typer) -> click.Command:
or len(typer_instance.registered_commands) > 1
):
# Create a Group
click_command = get_group(typer_instance)
click_command: click.Command = get_group(typer_instance)
if typer_instance._add_completion:
click_command.params.append(click_install_param)
click_command.params.append(click_show_param)
Expand Down Expand Up @@ -474,7 +474,7 @@ def get_group_from_info(
*,
pretty_exceptions_short: bool,
rich_markup_mode: MarkupMode,
) -> click.Command:
) -> TyperGroup:
assert (
group_info.typer_instance
), "A Typer instance is needed to generate a Click Group"
Expand Down

0 comments on commit d014dd3

Please sign in to comment.