Skip to content

Commit 8107a80

Browse files
[pre-commit.ci] pre-commit autoupdate (#364)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 751e5b2 commit 8107a80

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- repo: https://github.com/astral-sh/ruff-pre-commit
8-
rev: "v0.0.272"
8+
rev: "v0.0.275"
99
hooks:
1010
- id: ruff
1111
args: [--fix, --exit-non-zero-on-fix]
@@ -19,7 +19,7 @@ repos:
1919
- id: tox-ini-fmt
2020
args: ["-p", "fix"]
2121
- repo: https://github.com/tox-dev/pyproject-fmt
22-
rev: "0.12.0"
22+
rev: "0.12.1"
2323
hooks:
2424
- id: pyproject-fmt
2525
additional_dependencies: ["tox>=4.6"]

src/sphinx_autodoc_typehints/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ def get_annotation_args(annotation: Any, module: str, class_name: str) -> tuple[
150150
return annotation.__parameters__ # type: ignore[no-any-return]
151151
result = getattr(annotation, "__args__", ())
152152
# 3.10 and earlier Tuple[()] returns ((), ) instead of () the tuple does
153-
result = () if len(result) == 1 and result[0] == () else result # type: ignore[misc]
154-
return result
153+
return () if len(result) == 1 and result[0] == () else result # type: ignore[misc]
155154

156155

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

0 commit comments

Comments
 (0)