misc: Use python f-strings for string formatting

This patch has been generated by applying flynt to the
gem5 repo (ext has been excluded)

JIRA: https://gem5.atlassian.net/browse/GEM5-831

Change-Id: I0935db6223d5426b99515959bde78e374cbadb04
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68957
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Giacomo Travaglini
2023-03-15 13:34:46 +00:00
parent 07fca546e6
commit e73655d038
242 changed files with 814 additions and 1002 deletions

View File

@@ -67,7 +67,7 @@ staged_mismatch = set()
for status, fname in git.status(filter="MA", cached=True):
if args.verbose:
print("Checking {}...".format(fname))
print(f"Checking {fname}...")
if check_ignores(fname):
continue
if status == "M":
@@ -112,7 +112,7 @@ if failing_files:
print("Style checker failed for the following files:", file=sys.stderr)
for f in failing_files:
if f not in staged_mismatch:
print("\t{}".format(f), file=sys.stderr)
print(f"\t{f}", file=sys.stderr)
print("\n", file=sys.stderr)
print(
"Please run the style checker manually to fix "
@@ -130,6 +130,6 @@ if failing_files:
file=sys.stderr,
)
for f in staged_mismatch:
print("\t{}".format(f), file=sys.stderr)
print(f"\t{f}", file=sys.stderr)
print("Please `git --add' them", file=sys.stderr)
sys.exit(1)