diff --git a/typer/main.py b/typer/main.py index 36737e49ef..8beb61f7a5 100644 --- a/typer/main.py +++ b/typer/main.py @@ -473,9 +473,9 @@ def get_group_from_info( pretty_exceptions_short: bool, rich_markup_mode: MarkupMode, ) -> TyperGroup: - assert ( - group_info.typer_instance - ), "A Typer instance is needed to generate a Click Group" + assert group_info.typer_instance, ( + "A Typer instance is needed to generate a Click Group" + ) commands: Dict[str, click.Command] = {} for command_info in group_info.typer_instance.registered_commands: command = get_command_from_info( @@ -847,16 +847,16 @@ def get_click_param( # Handle Tuples and Lists if lenient_issubclass(origin, List): main_type = get_args(main_type)[0] - assert not get_origin( - main_type - ), "List types with complex sub-types are not currently supported" + assert not get_origin(main_type), ( + "List types with complex sub-types are not currently supported" + ) is_list = True elif lenient_issubclass(origin, Tuple): # type: ignore types = [] for type_ in get_args(main_type): - assert not get_origin( - type_ - ), "Tuple types with complex sub-types are not currently supported" + assert not get_origin(type_), ( + "Tuple types with complex sub-types are not currently supported" + ) types.append( get_click_type(annotation=type_, parameter_info=parameter_info) )