Show More
@@ -107,7 +107,7 def float_doctest(sphinx_shell, args, input_lines, found, submitted): | |||
|
107 | 107 | try: |
|
108 | 108 | rtol = float(args[2]) |
|
109 | 109 | atol = float(args[3]) |
|
110 |
except IndexError |
|
|
110 | except IndexError: | |
|
111 | 111 | e = ("Both `rtol` and `atol` must be specified " |
|
112 | 112 | "if either are specified: {0}".format(args)) |
|
113 | 113 | raise IndexError(e) from e |
@@ -196,6 +196,7 import ast | |||
|
196 | 196 | import warnings |
|
197 | 197 | import shutil |
|
198 | 198 | from io import StringIO |
|
199 | from typing import Any, Dict, Set | |
|
199 | 200 | |
|
200 | 201 | # Third-party |
|
201 | 202 | from docutils.parsers.rst import directives |
@@ -901,11 +902,11 class EmbeddedSphinxShell(object): | |||
|
901 | 902 | |
|
902 | 903 | class IPythonDirective(Directive): |
|
903 | 904 | |
|
904 | has_content = True | |
|
905 | required_arguments = 0 | |
|
906 | optional_arguments = 4 # python, suppress, verbatim, doctest | |
|
907 | final_argumuent_whitespace = True | |
|
908 | option_spec = { 'python': directives.unchanged, | |
|
905 | has_content: bool = True | |
|
906 | required_arguments: int = 0 | |
|
907 | optional_arguments: int = 4 # python, suppress, verbatim, doctest | |
|
908 | final_argumuent_whitespace: bool = True | |
|
909 | option_spec: Dict[str, Any] = { 'python': directives.unchanged, | |
|
909 | 910 | 'suppress' : directives.flag, |
|
910 | 911 | 'verbatim' : directives.flag, |
|
911 | 912 | 'doctest' : directives.flag, |
@@ -915,7 +916,7 class IPythonDirective(Directive): | |||
|
915 | 916 | |
|
916 | 917 | shell = None |
|
917 | 918 | |
|
918 | seen_docs = set() | |
|
919 | seen_docs: Set = set() | |
|
919 | 920 | |
|
920 | 921 | def get_config_options(self): |
|
921 | 922 | # contains sphinx configuration variables |
General Comments 0
You need to be logged in to leave comments.
Login now