Skip to content
Myr

🎨 Fix type annotations for `get_group` (#430)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastián Ramírez · committed by GitHub · parent e91630d · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:typer/main.py+3 added-3 removed
326 unmodified lines
327 )328 raise e329330331def get_group(typer_instance: Typer) -> click.Command:331def get_group(typer_instance: Typer) -> TyperGroup:332 group = get_group_from_info(333 TyperInfo(typer_instance),334 pretty_exceptions_short=typer_instance.pretty_exceptions_short,335 rich_markup_mode=typer_instance.rich_markup_mode,
10 unmodified lines
346 or typer_instance.registered_groups347 or len(typer_instance.registered_commands) > 1348 ):349 # Create a Group350 click_command = get_group(typer_instance)350 click_command: click.Command = get_group(typer_instance)351 if typer_instance._add_completion:352 click_command.params.append(click_install_param)353 click_command.params.append(click_show_param)354 return click_command
118 unmodified lines
473 group_info: TyperInfo,474 *,475 pretty_exceptions_short: bool,476 rich_markup_mode: MarkupMode,477) -> click.Command:477) -> TyperGroup:478 assert (479 group_info.typer_instance480 ), "A Typer instance is needed to generate a Click Group"481 commands: Dict[str, click.Command] = {}
569 unmodified lines