summaryrefslogtreecommitdiff
path: root/sphinx/util/docutils.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-29 23:56:30 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-30 17:22:56 +0900
commitab184ac20d82d0546c21f33d2fdfbfb324078d56 (patch)
tree225b6c5f9904d8699332add3cb0939fb8be68ef2 /sphinx/util/docutils.py
parent7a4bbf372a470700a1dfd96dd57054bb96b92fd3 (diff)
downloadsphinx-git-ab184ac20d82d0546c21f33d2fdfbfb324078d56.tar.gz
mypy: Enable disallow_incomplete_defs flag for type checking
Diffstat (limited to 'sphinx/util/docutils.py')
-rw-r--r--sphinx/util/docutils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py
index 233c1a2aa..564313505 100644
--- a/sphinx/util/docutils.py
+++ b/sphinx/util/docutils.py
@@ -279,7 +279,9 @@ def is_html5_writer_available() -> bool:
return __version_info__ > (0, 13, 0)
-def directive_helper(obj: Any, has_content: bool = None, argument_spec: Tuple[int, int, bool] = None, **option_spec) -> Any: # NOQA
+def directive_helper(obj: Any, has_content: bool = None,
+ argument_spec: Tuple[int, int, bool] = None, **option_spec: Any
+ ) -> Any:
warnings.warn('function based directive support is now deprecated. '
'Use class based directive instead.',
RemovedInSphinx30Warning)
@@ -317,7 +319,7 @@ def switch_source_input(state: State, content: StringList) -> Generator[None, No
class SphinxFileOutput(FileOutput):
"""Better FileOutput class for Sphinx."""
- def __init__(self, **kwargs) -> None:
+ def __init__(self, **kwargs: Any) -> None:
self.overwrite_if_changed = kwargs.pop('overwrite_if_changed', False)
super().__init__(**kwargs)