diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-05-26 21:09:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 21:09:27 (GMT) |
commit | 97b4576f655c09e32d2cbcdcdbda72b1bf9f438a (patch) | |
tree | 8acfd7cbf946540018fb7c80f9494ac56ec96c8d /Lib/importlib/resources.py | |
parent | 78a8428548445b501f5ebd6ff4647d93ffd8efd1 (diff) | |
download | cpython-97b4576f655c09e32d2cbcdcdbda72b1bf9f438a.zip cpython-97b4576f655c09e32d2cbcdcdbda72b1bf9f438a.tar.gz cpython-97b4576f655c09e32d2cbcdcdbda72b1bf9f438a.tar.bz2 |
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/resources.py')
-rw-r--r-- | Lib/importlib/resources.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/importlib/resources.py b/Lib/importlib/resources.py index db0e0c0..8a98663 100644 --- a/Lib/importlib/resources.py +++ b/Lib/importlib/resources.py @@ -68,9 +68,7 @@ def open_binary(package: Package, resource: Resource) -> BinaryIO: if data is not None: return BytesIO(data) - raise FileNotFoundError( - '{!r} resource not found in {!r}'.format(resource, spec.name) - ) + raise FileNotFoundError(f'{resource!r} resource not found in {spec.name!r}') def open_text( |