summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2022-08-04 15:56:13 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-08-04 18:17:42 +0200
commit4b5c55cf784dd85308efd1165574b6fa9bfcb3ad (patch)
tree0c290309e0a9a4de37f56ba23ac514d1ae14396e
parent7aedbd0f55a287483623cd38bb635e5bf25244f5 (diff)
downloadopenvswitch-4b5c55cf784dd85308efd1165574b6fa9bfcb3ad.tar.gz
python: Fix E275 missing whitespace after keyword.
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 python/ovs/db/idl.py:145:15: E275 missing whitespace after keyword python/ovs/db/idl.py:167:15: 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. Acked-by: Mike Pattrick <mkp@redhat.com> Acked-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--python/setup.py4
-rw-r--r--tests/test-ovsdb.py2
-rwxr-xr-xutilities/bugtool/ovs-bugtool.in2
3 files changed, 4 insertions, 4 deletions
diff --git a/python/setup.py b/python/setup.py
index cfe01763f..f6eb777f9 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -102,6 +102,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 123f89f08..01927f185 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')