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 --- tools/ac_converter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/ac_converter.py') diff --git a/tools/ac_converter.py b/tools/ac_converter.py index 075eae6..6c72f8d 100755 --- a/tools/ac_converter.py +++ b/tools/ac_converter.py @@ -414,7 +414,7 @@ cdata = configuration_data()''') print('check_headers = [') for token, hname in headers: - print(" ['{}', '{}'],".format(token, hname)) + print(f" ['{token}', '{hname}'],") print(']\n') print('''foreach h : check_headers @@ -430,7 +430,7 @@ print('check_functions = [') for tok in functions: if len(tok) == 3: tokstr, fdata0, fdata1 = tok - print(" ['{}', '{}', '#include<{}>'],".format(tokstr, fdata0, fdata1)) + print(f" ['{tokstr}', '{fdata0}', '#include<{fdata1}>'],") else: print('# check token', tok) print(']\n') @@ -445,7 +445,7 @@ endforeach # Convert sizeof checks. for elem, typename in sizes: - print("cdata.set('{}', cc.sizeof('{}'))".format(elem, typename)) + print(f"cdata.set('{elem}', cc.sizeof('{typename}'))") print(''' configure_file(input : 'config.h.meson', -- cgit v1.1