Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#364)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed Jun 26, 2023
1 parent 751e5b2 commit 8107a80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.272"
rev: "v0.0.275"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -19,7 +19,7 @@ repos:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "0.12.0"
rev: "0.12.1"
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.6"]
Expand Down
3 changes: 1 addition & 2 deletions src/sphinx_autodoc_typehints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ def get_annotation_args(annotation: Any, module: str, class_name: str) -> tuple[
return annotation.__parameters__ # type: ignore[no-any-return]
result = getattr(annotation, "__args__", ())
# 3.10 and earlier Tuple[()] returns ((), ) instead of () the tuple does
result = () if len(result) == 1 and result[0] == () else result # type: ignore[misc]
return result
return () if len(result) == 1 and result[0] == () else result # type: ignore[misc]


def format_internal_tuple(t: tuple[Any, ...], config: Config) -> str:
Expand Down

0 comments on commit 8107a80

Please sign in to comment.