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/scripts/gtkdochelper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesonbuild/scripts/gtkdochelper.py') diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py index 86949e5..153c3d9 100644 --- a/mesonbuild/scripts/gtkdochelper.py +++ b/mesonbuild/scripts/gtkdochelper.py @@ -72,7 +72,7 @@ def gtkdoc_run_check(cmd: T.List[str], cwd: str, library_paths: T.Optional[T.Lis # This preserves the order of messages. p, out = Popen_safe(cmd, cwd=cwd, env=env, stderr=subprocess.STDOUT)[0:2] if p.returncode != 0: - err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)] + err_msg = [f"{cmd!r} failed with status {p.returncode:d}"] if out: err_msg.append(out) raise MesonException('\n'.join(err_msg)) @@ -215,8 +215,8 @@ def build_gtkdoc(source_root: str, build_root: str, doc_subdir: str, src_subdirs gtkdoc_run_check(fixref_cmd, abs_out) if module_version: - shutil.move(os.path.join(htmldir, '{}.devhelp2'.format(module)), - os.path.join(htmldir, '{}-{}.devhelp2'.format(module, module_version))) + shutil.move(os.path.join(htmldir, f'{module}.devhelp2'), + os.path.join(htmldir, f'{module}-{module_version}.devhelp2')) def install_gtkdoc(build_root: str, doc_subdir: str, install_prefix: str, datadir: str, module: str) -> None: source = os.path.join(build_root, doc_subdir, 'html') -- cgit v1.1