From 60dec1aec9246ed986eae295cf3bbc684ace580b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 8 Jul 2021 14:53:14 +0300 Subject: chore: make f-strings without placeholders into normal strings This has no functional effect, but makes linters happy. It is also arguably the right thing to do. Sponsored-by: author --- share/python/lib/files.py | 2 +- share/python/lib/runcmd.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'share') diff --git a/share/python/lib/files.py b/share/python/lib/files.py index 0d622d7..fa219b4 100644 --- a/share/python/lib/files.py +++ b/share/python/lib/files.py @@ -89,7 +89,7 @@ def files_file_matches_regex(ctx, filename=None, regex=None): content = f.read() m = re.search(regex, content) if m is None: - logging.debug(f"files_file_matches_regex: no match") + logging.debug("files_file_matches_regex: no match") logging.debug(f" filenamed: {filename}") logging.debug(f" regex: {regex}") logging.debug(f" content: {content}") diff --git a/share/python/lib/runcmd.py b/share/python/lib/runcmd.py index 90ab890..da6c3fd 100644 --- a/share/python/lib/runcmd.py +++ b/share/python/lib/runcmd.py @@ -68,7 +68,7 @@ def runcmd_run(ctx, argv, **kwargs): kwargs["stdout"] = subprocess.PIPE kwargs["stderr"] = subprocess.PIPE - logging.debug(f"runcmd_run: running command") + logging.debug("runcmd_run: running command") log_value("argv", 1, dict(enumerate(argv))) log_value("env", 1, env) log_value("kwargs:", 1, kwargs) @@ -185,10 +185,10 @@ def _runcmd_output_is(actual, wanted): wanted = bytes(wanted, "utf8").decode("unicode_escape") logging.debug("_runcmd_output_is:") - logging.debug(f" actual:") + logging.debug(" actual:") log_lines(indent, actual) - logging.debug(f" wanted:") + logging.debug(" wanted:") log_lines(indent, wanted) assert_eq(actual, wanted) @@ -202,10 +202,10 @@ def _runcmd_output_isnt(actual, wanted): wanted = bytes(wanted, "utf8").decode("unicode_escape") logging.debug("_runcmd_output_isnt:") - logging.debug(f" actual:") + logging.debug(" actual:") log_lines(indent, actual) - logging.debug(f" wanted:") + logging.debug(" wanted:") log_lines(indent, wanted) assert_ne(actual, wanted) @@ -235,10 +235,10 @@ def _runcmd_output_contains(actual, wanted): wanted = bytes(wanted, "utf8").decode("unicode_escape") logging.debug("_runcmd_output_contains:") - logging.debug(f" actual:") + logging.debug(" actual:") log_lines(indent, actual) - logging.debug(f" wanted:") + logging.debug(" wanted:") log_lines(indent, wanted) assert_eq(wanted in actual, True) @@ -252,10 +252,10 @@ def _runcmd_output_doesnt_contain(actual, wanted): wanted = bytes(wanted, "utf8").decode("unicode_escape") logging.debug("_runcmd_output_doesnt_contain:") - logging.debug(f" actual:") + logging.debug(" actual:") log_lines(indent, actual) - logging.debug(f" wanted:") + logging.debug(" wanted:") log_lines(indent, wanted) assert_ne(wanted in actual, True) -- cgit v1.2.1