From 5a193ab20f86a388da7476b88d9436e3bb131e53 Mon Sep 17 00:00:00 2001 From: jacky06 Date: Wed, 6 May 2020 13:28:00 +0800 Subject: [PATCH] Update hacking for Python3 The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: I16995f9237168d16c834662876683760127aabb3 --- test-requirements.txt | 2 +- tox.ini | 3 ++- zun_tempest_plugin/tests/tempest/api/clients.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index ed1abb9..1021b95 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking<0.13,>=0.12.0 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 sphinx>=2.0.0,!=2.1.0 # BSD openstackdocstheme>=2.0.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 36d384c..92dd850 100644 --- a/tox.ini +++ b/tox.ini @@ -38,8 +38,9 @@ commands = oslo_debug_helper {posargs} [flake8] # E123, E125 skipped as they are invalid PEP-8. +# W504 line break after binary operator show-source = True -ignore = E123,E125 +ignore = E123,E125,W504 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build diff --git a/zun_tempest_plugin/tests/tempest/api/clients.py b/zun_tempest_plugin/tests/tempest/api/clients.py index 7d0c767..bca1230 100644 --- a/zun_tempest_plugin/tests/tempest/api/clients.py +++ b/zun_tempest_plugin/tests/tempest/api/clients.py @@ -118,8 +118,8 @@ class ZunClient(rest_client.RestClient): def request(self, *args, **kwargs): resp, resp_body = super(ZunClient, self).request(*args, **kwargs) if (CONTAINER_SERVICE_MICROVERSION and - CONTAINER_SERVICE_MICROVERSION - != api_version_utils.LATEST_MICROVERSION): + CONTAINER_SERVICE_MICROVERSION != + api_version_utils.LATEST_MICROVERSION): api_version_utils.assert_version_header_matches_request( self.api_microversion_header_name, get_container_service_api_version(),