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
This commit is contained in:
Andreas Jaeger 2020-03-28 19:48:45 +01:00 committed by Andreas Jaeger
parent ac100a7b76
commit 8cb0072adb
3 changed files with 4 additions and 3 deletions

View File

@ -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:

View File

@ -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

View File

@ -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