diff options
Diffstat (limited to 'sphinx/ext/doctest.py')
-rw-r--r-- | sphinx/ext/doctest.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sphinx/ext/doctest.py b/sphinx/ext/doctest.py index e48fca248..e7ee8c67d 100644 --- a/sphinx/ext/doctest.py +++ b/sphinx/ext/doctest.py @@ -31,6 +31,7 @@ from sphinx.util import logging from sphinx.util.console import bold # type: ignore from sphinx.util.docutils import SphinxDirective from sphinx.util.osutil import relpath +from sphinx.util.typing import OptionSpec if TYPE_CHECKING: from sphinx.application import Sphinx @@ -150,15 +151,19 @@ class TestDirective(SphinxDirective): class TestsetupDirective(TestDirective): - option_spec = {'skipif': directives.unchanged_required} # type: Dict + option_spec: OptionSpec = { + 'skipif': directives.unchanged_required + } class TestcleanupDirective(TestDirective): - option_spec = {'skipif': directives.unchanged_required} # type: Dict + option_spec: OptionSpec = { + 'skipif': directives.unchanged_required + } class DoctestDirective(TestDirective): - option_spec = { + option_spec: OptionSpec = { 'hide': directives.flag, 'no-trim-doctest-flags': directives.flag, 'options': directives.unchanged, @@ -169,7 +174,7 @@ class DoctestDirective(TestDirective): class TestcodeDirective(TestDirective): - option_spec = { + option_spec: OptionSpec = { 'hide': directives.flag, 'no-trim-doctest-flags': directives.flag, 'pyversion': directives.unchanged_required, @@ -179,7 +184,7 @@ class TestcodeDirective(TestDirective): class TestoutputDirective(TestDirective): - option_spec = { + option_spec: OptionSpec = { 'hide': directives.flag, 'no-trim-doctest-flags': directives.flag, 'options': directives.unchanged, |