We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6e1a8d commit 95ec78dCopy full SHA for 95ec78d
Lib/pathlib/__init__.py
@@ -1272,9 +1272,9 @@ def home(cls):
1272
def as_uri(self):
1273
"""Return the path as a URI."""
1274
if not self.is_absolute():
1275
- raise ValueError("relative path can't be expressed as a file URI")
+ raise ValueError("relative paths can't be expressed as file URIs")
1276
from urllib.request import pathname2url
1277
- return 'file:' + pathname2url(str(self))
+ return f'file:{pathname2url(str(self))}'
1278
1279
@classmethod
1280
def from_uri(cls, uri):
0 commit comments