From 49d1e7142eca6d303f1e929bdbe9d8e4749858b7 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 19 Jan 2024 04:40:29 +0000 Subject: [PATCH] Fix formatting --- sphinx/ext/autodoc/typehints.py | 2 +- sphinx/ext/extlinks.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sphinx/ext/autodoc/typehints.py b/sphinx/ext/autodoc/typehints.py index fc4278fc4f5..ac90c58df79 100644 --- a/sphinx/ext/autodoc/typehints.py +++ b/sphinx/ext/autodoc/typehints.py @@ -14,10 +14,10 @@ from sphinx.util.typing import stringify_annotation if TYPE_CHECKING: - from sphinx.ext.autodoc import Options from docutils.nodes import Element from sphinx.application import Sphinx + from sphinx.ext.autodoc import Options def record_typehints(app: Sphinx, objtype: str, name: str, obj: Any, diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py index 495ea1a6eb5..1e9bf7760a0 100644 --- a/sphinx/ext/extlinks.py +++ b/sphinx/ext/extlinks.py @@ -96,7 +96,8 @@ def make_link_role(name: str, base_url: str, caption: str) -> RoleFunction: # Remark: It is an implementation detail that we use Pythons %-formatting. # So far we only expose ``%s`` and require quoting of ``%`` using ``%%``. def role(typ: str, rawtext: str, text: str, lineno: int, - inliner: Inliner, options: dict[str, Any] | None = None, content: Sequence[str] = (), + inliner: Inliner, options: dict[str, Any] | None = None, + content: Sequence[str] = (), ) -> tuple[list[Node], list[system_message]]: text = utils.unescape(text) has_explicit_title, title, part = split_explicit_title(text)