diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-05-26 16:16:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-26 13:16:11 -0700 |
| commit | f6fbdb90ee450ad693f7a7809035d0dc968f98b7 (patch) | |
| tree | f83611c5e6c9a6d5215f00245a4c59460f6eb2a8 /Lib/importlib/resources.py | |
| parent | 6cc800d3634fdd002b986c3ffe6a3d5540f311a0 (diff) | |
| download | cpython-git-f6fbdb90ee450ad693f7a7809035d0dc968f98b7.tar.gz | |
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/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 db0e0c0eef..8a98663ff8 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( |
