summaryrefslogtreecommitdiff
path: root/sphinx/testing/path.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/testing/path.py')
-rw-r--r--sphinx/testing/path.py8
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.
"""