From 2156242e18c9162dd0b635a67a31df6fd34c3e42 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:12:04 -0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#424) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- src/sphinx_autodoc_typehints/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e5a5fe..bb7572c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.14" + rev: "v0.2.0" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/src/sphinx_autodoc_typehints/__init__.py b/src/sphinx_autodoc_typehints/__init__.py index 46d0e69..106b4f9 100644 --- a/src/sphinx_autodoc_typehints/__init__.py +++ b/src/sphinx_autodoc_typehints/__init__.py @@ -710,7 +710,7 @@ def _inject_signature( # noqa: C901 lines: list[str], ) -> None: for arg_name in signature.parameters: - annotation = type_hints.get(arg_name, None) + annotation = type_hints.get(arg_name) default = signature.parameters[arg_name].default