Without this, when using Python 3.12 and flake8 5.0.4, the following
errors are flagged:
  tests/check_acl_log.py:97:25: E231 missing whitespace after ':'
  tests/check_acl_log.py:102:71: E231 missing whitespace after ':'

While this seems a bit too restrictive from flake8 we can easily work
around it by just not using f-strings unless necessary.

This unblocks GitHub CI runs on branches <= 23.06.  These started
failing since the Python version we get in CI (in the Ubuntu runner)
changed to CPython (3.12.0).

Signed-off-by: Dumitru Ceara <[email protected]>
---
NOTE: this patch should be backported to all supported branches.
---
 tests/check_acl_log.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/check_acl_log.py b/tests/check_acl_log.py
index 0c1968b2eb..ed98044f77 100644
--- a/tests/check_acl_log.py
+++ b/tests/check_acl_log.py
@@ -94,12 +94,14 @@ def main():
                 print(
                     f"Expected log {key}={val} but got "
                     f"{key}={parsed_log[key]} "
-                    f"in:\n\t'{acl_log}'"
+                    "in:\n\t"
+                    f"'{acl_log}'"
                 )
                 exit(1)
         except KeyError:
             print(
-                f"Expected log {key}={val} but {key} does not exist in:\n"
+                f"Expected log {key}={val} but {key} "
+                "does not exist in:\n"
                 f"\t'{acl_log}'"
             )
             exit(1)
-- 
2.39.3

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to