From 8cb0072adb9a1f81fd0082785491843eab9fe10f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 28 Mar 2020 19:48:45 +0100 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 by updated hacking version. Change-Id: I4a4ec207f87d3afb58b6427825ce9b3872823008 --- os_api_ref/__init__.py | 3 ++- test-requirements.txt | 2 +- tox.ini | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/os_api_ref/__init__.py b/os_api_ref/__init__.py index 9bec268..01c31c3 100644 --- a/os_api_ref/__init__.py +++ b/os_api_ref/__init__.py @@ -206,6 +206,7 @@ class RestMethodDirective(rst.Directive): return [target, section] + # cache for file -> yaml so we only do the load and check of a yaml # file once during a sphinx processing run. YAML_CACHE = {} @@ -331,7 +332,7 @@ class RestParametersDirective(Table): else: continue - if len(self.env.path_params) is not 0: + if len(self.env.path_params) != 0: # Warn that path parameters are not set in rest_parameter # stanza and will not appear in the generated table. for param in self.env.path_params: diff --git a/test-requirements.txt b/test-requirements.txt index bdfd2b0..c43b63c 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>=1.1.0,<1.2.0 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 6995548..c7286f8 100644 --- a/tox.ini +++ b/tox.ini @@ -36,6 +36,6 @@ commands = oslo_debug_helper {posargs} [flake8] # E123, E125 skipped as they are invalid PEP-8. show-source = True -ignore = E123,E125,E129 +ignore = E123,E125,E129,W504 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build