Skip to content

Commit

Permalink
⬆ Bump ruff from 0.8.6 to 0.9.1 (#1118)
Browse files Browse the repository at this point in the history
* ⬆ Bump ruff from 0.8.6 to 0.9.1

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.6 to 0.9.1.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.8.6...0.9.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* format main with ruff 0.9.1

* 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

* ensure precommit version is consistent

* 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: svlandeg <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 27, 2025
1 parent 39ae7e7 commit 8148867
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
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

0 comments on commit 8148867

Please sign in to comment.