summaryrefslogtreecommitdiff
path: root/sphinx/util/nodes.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-02-17 22:11:14 +0000
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-02-18 01:58:05 +0000
commitc8f4a03daceef4470ddbc34d5879ffd01588a116 (patch)
treeb67cbca3c86b239e84e00b2ca5966e3c273ca18a /sphinx/util/nodes.py
parent8de6638697b8c785f8022e1f526b549e74d033d1 (diff)
downloadsphinx-git-c8f4a03daceef4470ddbc34d5879ffd01588a116.tar.gz
Fix COM812
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r--sphinx/util/nodes.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index 95ff063c4..1b43bd72e 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -299,7 +299,7 @@ def get_prev_node(node: Node) -> Node | None:
def traverse_translatable_index(
- doctree: Element
+ doctree: Element,
) -> Iterable[tuple[Element, list[IndexEntry]]]:
"""Traverse translatable index node from a document tree."""
matcher = NodeMatcher(addnodes.index, inline=False)
@@ -354,7 +354,7 @@ indextypes = [
]
-def process_index_entry(entry: str, targetid: str
+def process_index_entry(entry: str, targetid: str,
) -> list[tuple[str, str, str, str, str | None]]:
from sphinx.domains.python import pairindextypes
@@ -394,7 +394,7 @@ def process_index_entry(entry: str, targetid: str
def inline_all_toctrees(builder: Builder, docnameset: set[str], docname: str,
- tree: nodes.document, colorfunc: Callable, traversed: list[str]
+ tree: nodes.document, colorfunc: Callable, traversed: list[str],
) -> nodes.document:
"""Inline all toctrees in the *tree*.
@@ -526,7 +526,7 @@ def make_id(env: BuildEnvironment, document: nodes.document,
return node_id
-def find_pending_xref_condition(node: addnodes.pending_xref, condition: str
+def find_pending_xref_condition(node: addnodes.pending_xref, condition: str,
) -> Element | None:
"""Pick matched pending_xref_condition node up from the pending_xref."""
for subnode in node:
@@ -537,7 +537,7 @@ def find_pending_xref_condition(node: addnodes.pending_xref, condition: str
def make_refnode(builder: Builder, fromdocname: str, todocname: str, targetid: str | None,
- child: Node | list[Node], title: str | None = None
+ child: Node | list[Node], title: str | None = None,
) -> nodes.reference:
"""Shortcut to create a reference node."""
node = nodes.reference('', '', internal=True)