From 6a0fabc6472f49621260de215f128a31ae70219b Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 4 Mar 2021 17:16:11 -0500 Subject: mass rewrite of string formatting to use f-strings everywhere performed by running "pyupgrade --py36-plus" and committing the results --- mesonbuild/modules/fs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/modules/fs.py') 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: -- cgit v1.1