diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29de2b52..dd5240da 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.0.282" + rev: "v0.0.284" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -19,10 +19,10 @@ repos: - id: tox-ini-fmt args: ["-p", "fix"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "0.13.0" + rev: "0.13.1" hooks: - id: pyproject-fmt - additional_dependencies: ["tox>=4.6"] + additional_dependencies: ["tox>=4.8"] - repo: https://github.com/pre-commit/mirrors-prettier rev: "v3.0.1" hooks: diff --git a/pyproject.toml b/pyproject.toml index 65d419d3..35673610 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "hatchling.build" requires = [ "hatch-vcs>=0.3", - "hatchling>=1.17.1", + "hatchling>=1.18", ] [project] @@ -38,23 +38,23 @@ dynamic = [ "version", ] dependencies = [ - "Sphinx>=7.0.1", + "Sphinx>=7.1.2", ] optional-dependencies.docs = [ - "furo>=2023.5.20", - "sphinx>=7.0.1", + "furo>=2023.7.26", + "sphinx>=7.1.2", ] optional-dependencies.numpy = [ "nptyping>=2.5", ] optional-dependencies.testing = [ "covdefaults>=2.3", - "coverage>=7.2.7", - "diff-cover>=7.5", - "pytest>=7.3.1", + "coverage>=7.3", + "diff-cover>=7.7", + "pytest>=7.4", "pytest-cov>=4.1", "sphobjinv>=2.3.1", - "typing-extensions>=4.6.3", + "typing-extensions>=4.7.1", ] urls.Changelog = "https://github.com/tox-dev/sphinx-autodoc-typehints/blob/main/CHANGELOG.md" urls.Homepage = "https://github.com/tox-dev/sphinx-autodoc-typehints" diff --git a/src/sphinx_autodoc_typehints/__init__.py b/src/sphinx_autodoc_typehints/__init__.py index 177b738b..caf9926e 100644 --- a/src/sphinx_autodoc_typehints/__init__.py +++ b/src/sphinx_autodoc_typehints/__init__.py @@ -429,7 +429,7 @@ def _resolve_type_guarded_imports(autodoc_mock_imports: list[str], obj: Any) -> with mock(autodoc_mock_imports): exec(guarded_code, obj.__globals__) # noqa: S102 except Exception as exc: # noqa: BLE001 - _LOGGER.warning(f"Failed guarded type import with {exc!r}") + _LOGGER.warning("Failed guarded type import with %r", exc) def _get_type_hint(autodoc_mock_imports: list[str], name: str, obj: Any) -> dict[str, Any]: diff --git a/tests/roots/test-dummy/dummy_module_future_annotations.py b/tests/roots/test-dummy/dummy_module_future_annotations.py index 103c8abd..389cc98b 100644 --- a/tests/roots/test-dummy/dummy_module_future_annotations.py +++ b/tests/roots/test-dummy/dummy_module_future_annotations.py @@ -4,7 +4,7 @@ def function_with_py310_annotations( self, # noqa: ANN001, ARG001 x: bool | None, # noqa: ARG001 - y: int | str | float, # noqa: ARG001 + y: int | str | float, # noqa: ARG001,PYI041 z: str | None = None, # noqa: ARG001 ) -> str: """ diff --git a/tox.ini b/tox.ini index c3900d4c..489a9bac 100644 --- a/tox.ini +++ b/tox.ini @@ -52,7 +52,7 @@ extras = description = run type check on code base deps = mypy==1.4.1 - types-docutils>=0.20.0.1 + types-docutils>=0.20.0.2 set_env = {tty:MYPY_FORCE_COLOR = 1} commands = @@ -64,8 +64,8 @@ description = combine coverage files and generate diff (against DIFF_AGAINST def skip_install = true deps = covdefaults>=2.3 - coverage>=7.2.7 - diff-cover>=7.6 + coverage>=7.3 + diff-cover>=7.7 extras = parallel_show_output = true pass_env =