[Git][ghc/ghc][master] test driver refactor: replace `.format(**locals())` with f-string
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 83038fbe by David Eichmann at 2026-11-17T09:28:32-05:00 test driver refactor: replace `.format(**locals())` with f-string - - - - - 1 changed file: - testsuite/driver/testlib.py Changes: ===================================== testsuite/driver/testlib.py ===================================== @@ -2541,9 +2541,7 @@ async def simple_build(name: Union[TestName, str], flags = ' '.join(get_compiler_flags() + config.way_flags[way]) - cmd = ('{cmd_prefix} ' - '{{compiler}} {to_do} {src_args} {flags} {extra_hc_opts}' - ).format(**locals()) + cmd = f'{cmd_prefix} {{compiler}} {to_do} {src_args} {flags} {extra_hc_opts}' if filter_with != '': cmd = cmd + ' | ' + filter_with @@ -2742,13 +2740,12 @@ async def interpreter_run(name: TestName, flags = ' '.join(get_compiler_flags() + config.way_flags[way]) - cmd = ('{{compiler}} {srcname} {flags} {extra_hc_opts}' - ).format(**locals()) + cmd = f'{{compiler}} {srcname} {flags} {extra_hc_opts}' if opts.cmd_wrapper is not None: cmd = opts.cmd_wrapper(cmd); - cmd = 'cd "{opts.testdir}" && {cmd}'.format(**locals()) + cmd = f'cd "{opts.testdir}" && {cmd}' exit_code = await runCmd(cmd, script, stdout, stderr, timeout_multiplier=opts.run_timeout_multiplier) @@ -2946,7 +2943,7 @@ async def check_hp_ok(name: TestName) -> bool: opts = getTestOpts() # do not qualify for hp2ps because we should be in the right directory - hp2psCmd = 'cd "{opts.testdir}" && {{hp2ps}} {name}'.format(**locals()) + hp2psCmd = f'cd "{opts.testdir}" && {{hp2ps}} {name}' hp2psResult = await runCmd(hp2psCmd, print_output=True) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/83038fbee5efea8e3ebd5090b2ff5537... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/83038fbee5efea8e3ebd5090b2ff5537... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Marge Bot (@marge-bot)