convert-variable-renames: change f-string back
Add back Copyright info with update.
Signed-off-by Saul Wold <[email protected]>
--- scripts/contrib/convert-variable-renames.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
scripts/contrib/convert-variable-renames.py +7 -4
@@ -3,6 +3,9 @@ # Conversion script to rename variables to versions with improved terminology. # Also highlights potentially problematic langage and removed variables. # +# Copyright (C) 2021 Richard Purdie +# Copyright (C) 2022 Wind River Systems, Inc. +# # SPDX-License-Identifier: GPL-2.0-only #
@@ -56,7 +59,7 @@ context_check_list = [ def processfile(fn): - print(f"processing file '{fn}'") + print("processing file '%s'" % fn) try: fh, abs_path = tempfile.mkstemp() modified = False
@@ -75,13 +78,13 @@ def processfile(fn): # Find removed names for removed_name in removed_list: if removed_name in line: - print(f"{fn} needs further work at line {lineno} because {removed_name} has been deprecated") + print("%s needs further work at line %s because has been deprecated" % (fn, lineno, remove_name)) for check_word in context_check_list: if re.search(check_word, line, re.IGNORECASE): - print(f"{fn} needs further work at line {lineno} since it contains {check_word}") + print("%s needs further work at line %s since it contains %s"% (fn, lineno, check_word)) new_file.write(line) if modified: - print(f"*** Modified file '{fn}'") + print("*** Modified file '%s'" % (fn)) shutil.copymode(fn, abs_path) os.remove(fn) shutil.move(abs_path, fn)
Signature · 1 line
2.25.1