diff options
author | Gregory P. Smith <greg@krypto.org> | 2022-10-07 01:27:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 01:27:51 (GMT) |
commit | 27369ef56ffed8ab68abc201a52b259a065ed8d7 (patch) | |
tree | 1048143cf501070cc318dbbffd70729bcc74341e /Lib/importlib/util.py | |
parent | fa2d43e5184f5eaf3391844ec2400342a1b2ead4 (diff) | |
download | cpython-27369ef56ffed8ab68abc201a52b259a065ed8d7.zip cpython-27369ef56ffed8ab68abc201a52b259a065ed8d7.tar.gz cpython-27369ef56ffed8ab68abc201a52b259a065ed8d7.tar.bz2 |
gh-82874: Convert remaining importlib format uses to f-str. (#98005)
f-yes
Diffstat (limited to 'Lib/importlib/util.py')
-rw-r--r-- | Lib/importlib/util.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/importlib/util.py b/Lib/importlib/util.py index 9e29c58..5294578 100644 --- a/Lib/importlib/util.py +++ b/Lib/importlib/util.py @@ -60,10 +60,10 @@ def _find_spec_from_path(name, path=None): try: spec = module.__spec__ except AttributeError: - raise ValueError('{}.__spec__ is not set'.format(name)) from None + raise ValueError(f'{name}.__spec__ is not set') from None else: if spec is None: - raise ValueError('{}.__spec__ is None'.format(name)) + raise ValueError(f'{name}.__spec__ is None') return spec @@ -105,10 +105,10 @@ def find_spec(name, package=None): try: spec = module.__spec__ except AttributeError: - raise ValueError('{}.__spec__ is not set'.format(name)) from None + raise ValueError(f'{name}.__spec__ is not set') from None else: if spec is None: - raise ValueError('{}.__spec__ is None'.format(name)) + raise ValueError(f'{name}.__spec__ is None') return spec |