With just released flake8 5.0 we're getting a bunch of E275 errors:

 utilities/bugtool/ovs-bugtool.in:959:23: E275 missing whitespace after keyword
 tests/test-ovsdb.py:623:11: E275 missing whitespace after keyword
 python/setup.py:105:8: E275 missing whitespace after keyword
 python/setup.py:106:8: E275 missing whitespace after keyword
 make[2]: *** [flake8-check] Error 1

This breaks CI on branches below 2.16.  We don't see a problem right
now on newer branches because we're installing extra dependencies
that backtrack flake8 down to 4.1 or even 3.9.

Signed-off-by: Ilya Maximets <i.maxim...@ovn.org>
---
 python/setup.py                  | 4 ++--
 tests/test-ovsdb.py              | 2 +-
 utilities/bugtool/ovs-bugtool.in | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/python/setup.py b/python/setup.py
index 062901ddd..27684c404 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -124,6 +124,6 @@ except BuildFailed:
     print("Retrying the build without the C extension.")
     print("*" * 75)
 
-    del(setup_args['cmdclass'])
-    del(setup_args['ext_modules'])
+    del setup_args['cmdclass']
+    del setup_args['ext_modules']
     setuptools.setup(**setup_args)
diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py
index 853264f22..402cacbe9 100644
--- a/tests/test-ovsdb.py
+++ b/tests/test-ovsdb.py
@@ -620,7 +620,7 @@ def update_condition(idl, commands):
     commands = commands[len("condition "):].split(";")
     for command in commands:
         command = command.split(" ")
-        if(len(command) != 2):
+        if len(command) != 2:
             sys.stderr.write("Error parsing condition %s\n" % command)
             sys.exit(1)
 
diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in
index fa62cbe94..fee0de853 100755
--- a/utilities/bugtool/ovs-bugtool.in
+++ b/utilities/bugtool/ovs-bugtool.in
@@ -956,7 +956,7 @@ def load_plugins(just_capabilities=False, filter=None):
                     filters = []
                 else:
                     filters = filters_tmp.split(',')
-                if not(filter is None or filter in filters):
+                if not (filter is None or filter in filters):
                     continue
                 if el.tagName == "files":
                     newest_first = getBoolAttr(el, 'newest_first')
-- 
2.34.3

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to