summaryrefslogtreecommitdiff
path: root/Lib/importlib/_common.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-05-26 14:09:27 -0700
committerGitHub <noreply@github.com>2021-05-26 17:09:27 -0400
commit97b4576f655c09e32d2cbcdcdbda72b1bf9f438a (patch)
tree8acfd7cbf946540018fb7c80f9494ac56ec96c8d /Lib/importlib/_common.py
parent78a8428548445b501f5ebd6ff4647d93ffd8efd1 (diff)
downloadcpython-git-97b4576f655c09e32d2cbcdcdbda72b1bf9f438a.tar.gz
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). (GH-26387) (#26389)
Automerge-Triggered-By: GH:jaraco (cherry picked from commit f6fbdb90ee450ad693f7a7809035d0dc968f98b7) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Diffstat (limited to 'Lib/importlib/_common.py')
-rw-r--r--Lib/importlib/_common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/importlib/_common.py b/Lib/importlib/_common.py
index ed509971ce..549fee379a 100644
--- a/Lib/importlib/_common.py
+++ b/Lib/importlib/_common.py
@@ -31,7 +31,7 @@ def normalize_path(path):
str_path = str(path)
parent, file_name = os.path.split(str_path)
if parent:
- raise ValueError('{!r} must be only a file name'.format(path))
+ raise ValueError(f'{path!r} must be only a file name')
return file_name
@@ -65,7 +65,7 @@ def get_package(package):
"""
resolved = resolve(package)
if wrap_spec(resolved).submodule_search_locations is None:
- raise TypeError('{!r} is not a package'.format(package))
+ raise TypeError(f'{package!r} is not a package')
return resolved