summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/readers.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-05-26 20:16:11 (GMT)
committerGitHub <noreply@github.com>2021-05-26 20:16:11 (GMT)
commitf6fbdb90ee450ad693f7a7809035d0dc968f98b7 (patch)
treef83611c5e6c9a6d5215f00245a4c59460f6eb2a8 /Lib/importlib/readers.py
parent6cc800d3634fdd002b986c3ffe6a3d5540f311a0 (diff)
downloadcpython-f6fbdb90ee450ad693f7a7809035d0dc968f98b7.zip
cpython-f6fbdb90ee450ad693f7a7809035d0dc968f98b7.tar.gz
cpython-f6fbdb90ee450ad693f7a7809035d0dc968f98b7.tar.bz2
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). (GH-26387)
Automerge-Triggered-By: GH:jaraco
Diffstat (limited to 'Lib/importlib/readers.py')
-rw-r--r--Lib/importlib/readers.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/importlib/readers.py b/Lib/importlib/readers.py
index 3e91c1c..41089c0 100644
--- a/Lib/importlib/readers.py
+++ b/Lib/importlib/readers.py
@@ -94,16 +94,15 @@ class MultiplexedPath(abc.Traversable):
__truediv__ = joinpath
def open(self, *args, **kwargs):
- raise FileNotFoundError('{} is not a file'.format(self))
+ raise FileNotFoundError(f'{self} is not a file')
@property
def name(self):
return self._paths[0].name
def __repr__(self):
- return 'MultiplexedPath({})'.format(
- ', '.join("'{}'".format(path) for path in self._paths)
- )
+ paths = ', '.join(f"'{path}'" for path in self._paths)
+ return f'MultiplexedPath({paths})'
class NamespaceReader(abc.TraversableResources):