diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-03-04 17:16:11 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-03-04 17:16:11 -0500 |
commit | 6a0fabc6472f49621260de215f128a31ae70219b (patch) | |
tree | 6a67908358a2c5e5baa215fe0201dfe213dd8a01 /mesonbuild/modules/fs.py | |
parent | 4340bf34faca7eed8076ba4c388fbe15355f2183 (diff) | |
download | meson-6a0fabc6472f49621260de215f128a31ae70219b.zip meson-6a0fabc6472f49621260de215f128a31ae70219b.tar.gz meson-6a0fabc6472f49621260de215f128a31ae70219b.tar.bz2 |
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
Diffstat (limited to 'mesonbuild/modules/fs.py')
-rw-r--r-- | mesonbuild/modules/fs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/fs.py b/mesonbuild/modules/fs.py index fd1e99b..9594460 100644 --- a/mesonbuild/modules/fs.py +++ b/mesonbuild/modules/fs.py @@ -113,7 +113,7 @@ class FSModule(ExtensionModule): def hash(self, state: 'ModuleState', args: T.Tuple[str, str], kwargs: T.Dict[str, T.Any]) -> ModuleReturnValue: file = self._resolve_dir(state, args[0]) if not file.is_file(): - raise MesonException('{} is not a file and therefore cannot be hashed'.format(file)) + raise MesonException(f'{file} is not a file and therefore cannot be hashed') try: h = hashlib.new(args[1]) except ValueError: @@ -127,7 +127,7 @@ class FSModule(ExtensionModule): def size(self, state: 'ModuleState', args: T.Tuple[str], kwargs: T.Dict[str, T.Any]) -> ModuleReturnValue: file = self._resolve_dir(state, args[0]) if not file.is_file(): - raise MesonException('{} is not a file and therefore cannot be sized'.format(file)) + raise MesonException(f'{file} is not a file and therefore cannot be sized') try: return ModuleReturnValue(file.stat().st_size, []) except ValueError: |