Update hacking for Python3

The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found:
E117 over-indented

Blacklist:
E402 module level import not at top of file
W504 line break after binary operator

Change-Id: I05b04a6f15683f7f37a5be49cc50c02eb3bbf7a7
This commit is contained in:
Andreas Jaeger
2020-03-28 15:36:33 +01:00
parent c4770df453
commit df56f7af7f
4 changed files with 7 additions and 6 deletions

View File

@@ -326,7 +326,7 @@ class SessionClient(adapter.LegacyJsonAdapter):
raise exc.EndpointException(message=message)
if (self.endpoint_override is not None and
location.lower().startswith(self.endpoint_override.lower())):
return location[len(self.endpoint_override):]
return location[len(self.endpoint_override):]
else:
return location

View File

@@ -14,12 +14,12 @@
#
import logging
from oslo_serialization import jsonutils
from cyborgclient import exceptions as exc
LOG = logging.getLogger(__name__)
from oslo_serialization import jsonutils
def common_filters(marker=None, limit=None, sort_key=None, sort_dir=None):
"""Generate common filters for any list request.

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>=0.12.0,<0.13 # Apache-2.0
hacking>=3.0,<3.1.0 # Apache-2.0
coverage>=4.0,!=4.4 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD

View File

@@ -61,8 +61,9 @@ commands =
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# W504 line break after binary operator
# E402 module level import not at top of file
show-source = True
ignore = E123,E125
ignore = E123,E125,W504,E402
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build