Use f-strings or .format() over percent style

https://docs.astral.sh/ruff/rules/printf-string-formatting/

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate
2023-11-16 05:56:40 +02:00
parent 21fe4eafec
commit 6c0b816e73
13 changed files with 40 additions and 58 deletions

View File

@ -362,7 +362,7 @@ def main():
exit_helper(1)
except GentoolkitException as err:
output.eerror("%s: %s" % (query, str(err)))
output.eerror(f"{query}: {str(err)}")
exit_helper(1)
except Exception as err:
@ -372,7 +372,7 @@ def main():
traceback.print_exc(file=sys.stderr)
print("-" * 60)
output.eerror("%s: %s" % (query, str(err)))
output.eerror(f"{query}: {str(err)}")
exit_helper(1)
if not ret and not CONFIG["quiet"]: