Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#452)
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] authored May 3, 2024
1 parent 9a623d6 commit aa4965c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.14.2"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.1"
rev: "v0.4.2"
hooks:
- id: ruff-format
- id: ruff
Expand Down
18 changes: 9 additions & 9 deletions tests/test_sphinx_autodoc_typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def test_parse_annotation(annotation: Any, module: str, class_name: str, args: t
pytest.param(type, ":py:class:`type`", id="type"),
pytest.param(collections.abc.Callable, ":py:class:`~collections.abc.Callable`", id="abc-Callable"),
pytest.param(Type, ":py:class:`~typing.Type`", id="typing-Type"), # noqa: UP006
pytest.param(Type[A], r":py:class:`~typing.Type`\ \[:py:class:`~%s.A`]" % __name__, id="typing-A"), # noqa: UP006
pytest.param(Type[A], rf":py:class:`~typing.Type`\ \[:py:class:`~{__name__}.A`]", id="typing-A"), # noqa: UP006
pytest.param(Any, ":py:data:`~typing.Any`", id="Any"),
pytest.param(AnyStr, ":py:data:`~typing.AnyStr`", id="AnyStr"),
pytest.param(Generic[T], r":py:class:`~typing.Generic`\ \[:py:class:`~typing.TypeVar`\ \(``T``)]", id="Generic"),
Expand Down Expand Up @@ -319,14 +319,14 @@ def test_parse_annotation(annotation: Any, module: str, class_name: str, args: t
pytest.param(Pattern[str], r":py:class:`~typing.Pattern`\ \[:py:class:`str`]", id="Pattern-str"),
pytest.param(IO, ":py:class:`~typing.IO`", id="IO"),
pytest.param(IO[str], r":py:class:`~typing.IO`\ \[:py:class:`str`]", id="IO-str"),
pytest.param(Metaclass, ":py:class:`~%s.Metaclass`" % __name__, id="Metaclass"),
pytest.param(A, ":py:class:`~%s.A`" % __name__, id="A"),
pytest.param(B, ":py:class:`~%s.B`" % __name__, id="B"),
pytest.param(B[int], r":py:class:`~%s.B`\ \[:py:class:`int`]" % __name__, id="B-int"),
pytest.param(C, ":py:class:`~%s.C`" % __name__, id="C"),
pytest.param(D, ":py:class:`~%s.D`" % __name__, id="D"),
pytest.param(E, ":py:class:`~%s.E`" % __name__, id="E"),
pytest.param(E[int], r":py:class:`~%s.E`\ \[:py:class:`int`]" % __name__, id="E-int"),
pytest.param(Metaclass, f":py:class:`~{__name__}.Metaclass`", id="Metaclass"),
pytest.param(A, f":py:class:`~{__name__}.A`", id="A"),
pytest.param(B, f":py:class:`~{__name__}.B`", id="B"),
pytest.param(B[int], rf":py:class:`~{__name__}.B`\ \[:py:class:`int`]", id="B-int"),
pytest.param(C, f":py:class:`~{__name__}.C`", id="C"),
pytest.param(D, f":py:class:`~{__name__}.D`", id="D"),
pytest.param(E, f":py:class:`~{__name__}.E`", id="E"),
pytest.param(E[int], rf":py:class:`~{__name__}.E`\ \[:py:class:`int`]", id="E-int"),
pytest.param(W, rf":py:{'class' if PY310_PLUS else 'func'}:`~typing.NewType`\ \(``W``, :py:class:`str`)", id="W"),
pytest.param(T, r":py:class:`~typing.TypeVar`\ \(``T``)", id="T"),
pytest.param(U_co, r":py:class:`~typing.TypeVar`\ \(``U_co``, covariant=True)", id="U-co"),
Expand Down

0 comments on commit aa4965c

Please sign in to comment.