Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-03 15:12:57 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-03 15:12:58 +0300
commitddc9698dfe77c6d67f208b5e1f15660d5a2883ff (patch)
tree06d5ddb5b880d851265a92195bb377f4ca11345d /sphinx/roles.py
parent7caf34c6e4dd1f17de15129ae260bae9fa067751 (diff)
Fix annotations of resolve_nodes
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r--sphinx/roles.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index 1523a3544..673c8978f 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -121,8 +121,7 @@ class XRefRole:
if self.fix_parens:
text, tgt = self._fix_parens(env, False, text, "")
innernode = self.innernodeclass(rawtext, text, classes=classes)
- return self.result_nodes(inliner.document, env, innernode,
- is_ref=False)
+ return self.result_nodes(inliner.document, env, innernode, is_ref=False)
# split title and target in role content
has_explicit_title, title, target = split_explicit_title(text)
title = utils.unescape(title)
@@ -160,7 +159,7 @@ class XRefRole:
return title, ws_re.sub(' ', target)
def result_nodes(self, document, env, node, is_ref):
- # type: (nodes.document, BuildEnvironment, nodes.Element, bool) -> Tuple[List[nodes.Element], List[nodes.system_message]] # NOQA
+ # type: (nodes.document, BuildEnvironment, nodes.Element, bool) -> Tuple[List[nodes.Node], List[nodes.system_message]] # NOQA
"""Called before returning the finished nodes. *node* is the reference
node if one was created (*is_ref* is then true), else the content node.
This method can add other nodes and must return a ``(nodes, messages)``