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
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
args:
Expand Down
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ coverage[toml] >=6.2,<8.0
pytest-xdist >=1.32.0,<4.0.0
pytest-sugar >=0.9.4,<1.1.0
mypy ==1.4.1
ruff ==0.8.6
ruff ==0.9.1
# Needed explicitly by typer-slim
rich >=10.11.0
shellingham >=1.3.0
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