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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆ Bump ruff from 0.8.6 to 0.9.1 #1118

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
  • Loading branch information
pre-commit-ci[bot] committed Jan 16, 2025
commit d67862ac7e32cb3a2f39f10cf9b6d098856003a9
18 changes: 9 additions & 9 deletions typer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
)
Expand Down
Loading