Use literal string interpolation in core (f-strings) (#26166)

This commit is contained in:
Franck Nijhof authored and Paulus Schoutsen committed 2019-08-23 09:53:33 -07:00
1 parent 1efa29d6ff
commit decf13b948
67 files changed
+180 -246

No files matched your search

+2 -2
View File
@@ -34,7 +34,7 @@ def printc(the_color, *args):
print(escape_codes[the_color] + msg + escape_codes["reset"])
except KeyError:
print(msg)
raise ValueError("Invalid color {}".format(the_color))
raise ValueError(f"Invalid color {the_color}")
def validate_requirements_ok():
@@ -145,7 +145,7 @@ async def lint(files):
lint_ok = True
for err in res:
err_msg = "{} {}:{} {}".format(err.file, err.line, err.col, err.msg)
err_msg = f"{err.file} {err.line}:{err.col} {err.msg}"
# tests/* does not have to pass lint
if err.skip: