From d67862ac7e32cb3a2f39f10cf9b6d098856003a9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:43:38 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20format?= =?UTF-8?q?=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typer/main.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/typer/main.py b/typer/main.py index 8beb61f7a5..36737e49ef 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) )