summaryrefslogtreecommitdiff
path: root/sphinx/testing/path.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2023-01-02 00:01:14 +0000
committerGitHub <noreply@github.com>2023-01-02 00:01:14 +0000
commit4032070e8131f518bbb8a04e8d63c5af4df9b59d (patch)
tree47b14f58d5337448e8358029264ebcd6d1ae7351 /sphinx/testing/path.py
parentede68fa423107fbab74d07b307d7dcb03c00dfbd (diff)
downloadsphinx-git-4032070e8131f518bbb8a04e8d63c5af4df9b59d.tar.gz
Run pyupgrade (#11070)
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 9c03132de..8660e0a3c 100644
--- a/sphinx/testing/path.py
+++ b/sphinx/testing/path.py
@@ -26,7 +26,7 @@ class path(str):
"""
@property
- def parent(self) -> "path":
+ def parent(self) -> path:
"""
The name of the directory the file or directory is in.
"""
@@ -35,7 +35,7 @@ class path(str):
def basename(self) -> str:
return os.path.basename(self)
- def abspath(self) -> "path":
+ def abspath(self) -> path:
"""
Returns the absolute path.
"""
@@ -195,7 +195,7 @@ class path(str):
"""
os.makedirs(self, mode, exist_ok=exist_ok)
- def joinpath(self, *args: Any) -> "path":
+ def joinpath(self, *args: Any) -> path:
"""
Joins the path with the argument given and returns the result.
"""
@@ -207,4 +207,4 @@ class path(str):
__div__ = __truediv__ = joinpath
def __repr__(self) -> str:
- return '%s(%s)' % (self.__class__.__name__, super().__repr__())
+ return f'{self.__class__.__name__}({super().__repr__()})'