diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2022-08-04 15:56:13 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-08-04 18:17:54 +0200 |
commit | fff104f8fb5182f83990cb19db55c50a38b7699b (patch) | |
tree | 5d7b348d16c9ed3428666bece6a4dab2dc0cca3f | |
parent | c58feeb68da0a62e883c105fe3bb5a2b59861aa8 (diff) | |
download | openvswitch-fff104f8fb5182f83990cb19db55c50a38b7699b.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.py | 4 | ||||
-rw-r--r-- | tests/test-ovsdb.py | 2 | ||||
-rwxr-xr-x | utilities/bugtool/ovs-bugtool.in | 2 |
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 987d21106..7fa14986a 100755 --- a/utilities/bugtool/ovs-bugtool.in +++ b/utilities/bugtool/ovs-bugtool.in @@ -954,7 +954,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') |