diff options
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 |