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

[pre-commit.ci] pre-commit autoupdate #364

Merged
merged 2 commits into from Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
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
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