Skip to content

Commit 95ec78d

Browse files
Apply suggestions from code review
Co-authored-by: Adam Turner <[email protected]>
1 parent c6e1a8d commit 95ec78d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/pathlib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,9 +1272,9 @@ def home(cls):
12721272
def as_uri(self):
12731273
"""Return the path as a URI."""
12741274
if not self.is_absolute():
1275-
raise ValueError("relative path can't be expressed as a file URI")
1275+
raise ValueError("relative paths can't be expressed as file URIs")
12761276
from urllib.request import pathname2url
1277-
return 'file:' + pathname2url(str(self))
1277+
return f'file:{pathname2url(str(self))}'
12781278

12791279
@classmethod
12801280
def from_uri(cls, uri):

0 commit comments

Comments
 (0)