diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-01 18:14:50 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-01 19:49:14 +0900 |
| commit | d6eacf3198f0ac8874e43453478d673238861675 (patch) | |
| tree | a3b3add8239f0b2a5c95919ca7147acc18791926 /sphinx/ext/graphviz.py | |
| parent | 48bc80209da4404285863bd27e611887929426b7 (diff) | |
| download | sphinx-git-d6eacf3198f0ac8874e43453478d673238861675.tar.gz | |
Fix annotations for Directives (Replace N_co with nodes.Node)
Diffstat (limited to 'sphinx/ext/graphviz.py')
| -rw-r--r-- | sphinx/ext/graphviz.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index ea10f9173..e073d63b8 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -35,7 +35,7 @@ if False: from docutils.parsers.rst import Directive # NOQA from typing import Any, Dict, List, Tuple, Union # NOQA from sphinx.application import Sphinx # NOQA - from sphinx.util.typing import N_co, unicode # NOQA + from sphinx.util.typing import unicode # NOQA from sphinx.writers.html import HTMLTranslator # NOQA from sphinx.writers.latex import LaTeXTranslator # NOQA from sphinx.writers.manpage import ManualPageTranslator # NOQA @@ -135,7 +135,7 @@ class Graphviz(SphinxDirective): } def run(self): - # type: () -> List[N_co] + # type: () -> List[nodes.Node] if self.arguments: document = self.state.document if self.content: @@ -195,7 +195,7 @@ class GraphvizSimple(SphinxDirective): } def run(self): - # type: () -> List[N_co] + # type: () -> List[nodes.Node] node = graphviz() node['code'] = '%s %s {\n%s\n}\n' % \ (self.name, self.arguments[0], '\n'.join(self.content)) @@ -392,7 +392,7 @@ def render_dot_texinfo(self, node, code, options, prefix='graphviz'): def texinfo_visit_graphviz(self, node): - # type: (nodes.NodeVisitor, graphviz) -> None + # type: (TexinfoTranslator, graphviz) -> None render_dot_texinfo(self, node, node['code'], node['options']) |
