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/testing/path.py | |
parent | 7a4bbf372a470700a1dfd96dd57054bb96b92fd3 (diff) | |
download | sphinx-git-ab184ac20d82d0546c21f33d2fdfbfb324078d56.tar.gz |
mypy: Enable disallow_incomplete_defs flag for type checking
Diffstat (limited to 'sphinx/testing/path.py')
-rw-r--r-- | sphinx/testing/path.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/testing/path.py b/sphinx/testing/path.py index d2fc4f31e..be3c74b37 100644 --- a/sphinx/testing/path.py +++ b/sphinx/testing/path.py @@ -124,17 +124,17 @@ class path(str): def utime(self, arg: Any) -> None: os.utime(self, arg) - def open(self, mode: str = 'r', **kwargs) -> IO: + def open(self, mode: str = 'r', **kwargs: Any) -> IO: return open(self, mode, **kwargs) - def write_text(self, text: str, encoding: str = 'utf-8', **kwargs) -> None: + def write_text(self, text: str, encoding: str = 'utf-8', **kwargs: Any) -> None: """ Writes the given `text` to the file. """ with open(self, 'w', encoding=encoding, **kwargs) as f: f.write(text) - def text(self, encoding: str = 'utf-8', **kwargs) -> str: + def text(self, encoding: str = 'utf-8', **kwargs: Any) -> str: """ Returns the text in the file. """ @@ -181,7 +181,7 @@ class path(str): """ os.makedirs(self, mode, exist_ok=exist_ok) - def joinpath(self, *args) -> "path": + def joinpath(self, *args: Any) -> "path": """ Joins the path with the argument given and returns the result. """ |