summaryrefslogtreecommitdiff
path: root/sphinx/util/nodes.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-06-03 23:46:13 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-06-03 23:46:13 +0900
commit6a55947e9f8f51c42a4719663f10b85c921a5918 (patch)
tree4315f8b35a232794ba4069cfe0301308101239b6 /sphinx/util/nodes.py
parentcee921fe416068021996ec24ad19afb54cd6bbec (diff)
parented75950017e63b3ccfe2beef3d22ae6ec44410b0 (diff)
downloadsphinx-git-6a55947e9f8f51c42a4719663f10b85c921a5918.tar.gz
Merge branch '3.0.x' into 3.x
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r--sphinx/util/nodes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index a18eac580..1ec3a19d0 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -29,6 +29,7 @@ if False:
# For type annotation
from typing import Type # for python3.5.1
from sphinx.builders import Builder
+ from sphinx.domain import IndexEntry
from sphinx.environment import BuildEnvironment
from sphinx.utils.tags import Tags
@@ -313,7 +314,7 @@ def get_prev_node(node: Node) -> Node:
return None
-def traverse_translatable_index(doctree: Element) -> Iterable[Tuple[Element, List[str]]]:
+def traverse_translatable_index(doctree: Element) -> Iterable[Tuple[Element, List["IndexEntry"]]]: # NOQA
"""Traverse translatable index node from a document tree."""
for node in doctree.traverse(NodeMatcher(addnodes.index, inline=False)): # type: addnodes.index # NOQA
if 'raw_entries' in node: