mirror of
https://github.com/python/cpython.git
synced 2025-09-11 19:27:07 +00:00
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). (GH-26387)
Automerge-Triggered-By: GH:jaraco
This commit is contained in:
parent
6cc800d363
commit
f6fbdb90ee
6 changed files with 10 additions and 12 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue