Fix typehints: sphinx.directives

This commit is contained in:
Takeshi KOMIYA 2018-11-05 01:25:31 +09:00
parent 99bb07740e
commit babd33e388

View File

@ -165,7 +165,7 @@ class Author(SphinxDirective):
# type: () -> List[nodes.Node]
if not self.config.show_authors:
return []
para = nodes.paragraph(translatable=False)
para = nodes.paragraph(translatable=False) # type: nodes.Node
emph = nodes.emphasis()
para += emph
if self.name == 'sectionauthor':
@ -247,7 +247,7 @@ class Centered(SphinxDirective):
# type: () -> List[nodes.Node]
if not self.arguments:
return []
subnode = addnodes.centered()
subnode = addnodes.centered() # type: nodes.Node
inodes, messages = self.state.inline_text(self.arguments[0],
self.lineno)
subnode.extend(inodes)