diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-13 01:33:14 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-15 02:42:42 +0900 |
commit | 53917f228f9bfbb4607b6441119baeb129869b93 (patch) | |
tree | 4e87e2e8a2fc209f74a3675dc0f079bda78b6a3b /sphinx/testing/path.py | |
parent | f8a2e7aa8af27b9d90330d9d795ef20fe0158001 (diff) | |
download | sphinx-git-53917f228f9bfbb4607b6441119baeb129869b93.tar.gz |
Move to py3 mode for mypy (and remove many "type: ignore" comments)
Diffstat (limited to 'sphinx/testing/path.py')
-rw-r--r-- | sphinx/testing/path.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/testing/path.py b/sphinx/testing/path.py index 574f56c6f..438a42d53 100644 --- a/sphinx/testing/path.py +++ b/sphinx/testing/path.py @@ -155,7 +155,7 @@ class path(text_type): """ if isinstance(text, bytes): text = text.decode(encoding) - with open(self, 'w', encoding=encoding, **kwargs) as f: # type: ignore + with open(self, 'w', encoding=encoding, **kwargs) as f: f.write(text) def text(self, encoding='utf-8', **kwargs): @@ -163,7 +163,7 @@ class path(text_type): """ Returns the text in the file. """ - with open(self, encoding=encoding, **kwargs) as f: # type: ignore + with open(self, encoding=encoding, **kwargs) as f: return f.read() def bytes(self): @@ -209,7 +209,7 @@ class path(text_type): """ Recursively create directories. """ - os.makedirs(self, mode, exist_ok=exist_ok) # type: ignore + os.makedirs(self, mode, exist_ok=exist_ok) def joinpath(self, *args): # type: (Any) -> path |