Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃帹 Fix type annotations for get_group #430

Merged
merged 1 commit into from Jul 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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