summaryrefslogtreecommitdiff
path: root/sphinx/util/nodes.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-02 23:55:36 +0900
committerGitHub <noreply@github.com>2018-12-02 23:55:36 +0900
commit8068cef267d771cd933316ba93b13665e8282c9d (patch)
tree94ae28f0358fa323f2b9e89ac7bcf010fd4f6428 /sphinx/util/nodes.py
parent28add225f2f11d76b7720ed4b7b76aacea6932b3 (diff)
parenta4749ca46839338329c446cba671dac008201e3e (diff)
downloadsphinx-git-8068cef267d771cd933316ba93b13665e8282c9d.tar.gz
Merge pull request #5703 from tk0miya/fix_typehints_for_builders
Fix annotations for builders
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r--sphinx/util/nodes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index 0c6fde87e..bb6d807fe 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -279,7 +279,7 @@ def extract_messages(doctree):
def find_source_node(node):
- # type: (nodes.Node) -> unicode
+ # type: (nodes.Element) -> unicode
for pnode in traverse_parent(node):
if pnode.source:
return pnode.source
@@ -287,7 +287,7 @@ def find_source_node(node):
def traverse_parent(node, cls=None):
- # type: (nodes.Node, Any) -> Iterable[nodes.Node]
+ # type: (nodes.Element, Any) -> Iterable[nodes.Element]
while node:
if cls is None or isinstance(node, cls):
yield node
@@ -390,7 +390,7 @@ def process_index_entry(entry, targetid):
def inline_all_toctrees(builder, docnameset, docname, tree, colorfunc, traversed):
- # type: (Builder, Set[unicode], unicode, nodes.document, Callable, List[unicode]) -> nodes.Element # NOQA
+ # type: (Builder, Set[unicode], unicode, nodes.document, Callable, List[unicode]) -> nodes.document # NOQA
"""Inline all toctrees in the *tree*.
Record all docnames in *docnameset*, and output docnames with *colorfunc*.