diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-29 23:56:30 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-30 17:22:56 +0900 |
commit | ab184ac20d82d0546c21f33d2fdfbfb324078d56 (patch) | |
tree | 225b6c5f9904d8699332add3cb0939fb8be68ef2 /sphinx/io.py | |
parent | 7a4bbf372a470700a1dfd96dd57054bb96b92fd3 (diff) | |
download | sphinx-git-ab184ac20d82d0546c21f33d2fdfbfb324078d56.tar.gz |
mypy: Enable disallow_incomplete_defs flag for type checking
Diffstat (limited to 'sphinx/io.py')
-rw-r--r-- | sphinx/io.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/io.py b/sphinx/io.py index 4f354aace..8253f4a9c 100644 --- a/sphinx/io.py +++ b/sphinx/io.py @@ -59,7 +59,7 @@ class SphinxBaseReader(standalone.Reader): transforms = [] # type: List[Type[Transform]] - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: from sphinx.application import Sphinx if len(args) > 0 and isinstance(args[0], Sphinx): self._app = args[0] @@ -181,7 +181,7 @@ class SphinxDummyWriter(UnfilteredWriter): pass -def SphinxDummySourceClass(source: Any, *args, **kwargs) -> Any: +def SphinxDummySourceClass(source: Any, *args: Any, **kwargs: Any) -> Any: """Bypass source object as is to cheat Publisher.""" return source @@ -192,7 +192,7 @@ class SphinxBaseFileInput(FileInput): It supports to replace unknown Unicode characters to '?'. """ - def __init__(self, app: "Sphinx", env: BuildEnvironment, *args, **kwds) -> None: + def __init__(self, app: "Sphinx", env: BuildEnvironment, *args: Any, **kwds: Any) -> None: self.app = app self.env = env @@ -210,7 +210,7 @@ class SphinxFileInput(FileInput): """A basic FileInput for Sphinx.""" supported = ('*',) # RemovedInSphinx30Warning - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: kwargs['error_handler'] = 'sphinx' super().__init__(*args, **kwargs) |