diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-03-13 11:10:50 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-03-13 11:15:12 +0300 |
commit | a523a896635b5fc5e48cd12a7c034ebcbc71a43b (patch) | |
tree | 3b8a6d41d3de3cdd2392ed2efa02b5e2f8ed7dec /sphinx/ext/graphviz.py | |
parent | c817c206265f545529b5fabe43fdf162bbc9bea2 (diff) |
refactor: Add a type alias for the option_spec of directives; OptionSpec
Diffstat (limited to 'sphinx/ext/graphviz.py')
-rw-r--r-- | sphinx/ext/graphviz.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index f10285086..f10edfaae 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -30,6 +30,7 @@ from sphinx.util.fileutil import copy_asset from sphinx.util.i18n import search_image_for_language from sphinx.util.nodes import set_source_info from sphinx.util.osutil import ensuredir +from sphinx.util.typing import OptionSpec from sphinx.writers.html import HTMLTranslator from sphinx.writers.latex import LaTeXTranslator from sphinx.writers.manpage import ManualPageTranslator @@ -113,7 +114,7 @@ class Graphviz(SphinxDirective): required_arguments = 0 optional_arguments = 1 final_argument_whitespace = False - option_spec = { + option_spec: OptionSpec = { 'alt': directives.unchanged, 'align': align_spec, 'caption': directives.unchanged, @@ -181,7 +182,7 @@ class GraphvizSimple(SphinxDirective): required_arguments = 1 optional_arguments = 0 final_argument_whitespace = False - option_spec = { + option_spec: OptionSpec = { 'alt': directives.unchanged, 'align': align_spec, 'caption': directives.unchanged, |