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 f6fbdb90ee)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
This commit is contained in:
Miss Islington (bot) 2021-05-26 14:09:27 -07:00 committed by GitHub
parent 78a8428548
commit 97b4576f65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 12 deletions

View file

@ -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(