Update hacking version
1. update hacking version to latest 2. fix the pep8 failed Change-Id: I484a40fe3cb868d223a807edcd3e20f5e0ebdf4e
This commit is contained in:
parent
b13ba0138f
commit
85e9b58e9b
|
@ -25,7 +25,7 @@ futurist==1.2.0
|
|||
gitdb==0.6.4
|
||||
GitPython==1.0.1
|
||||
greenlet==0.4.10
|
||||
hacking==0.12.0
|
||||
hacking==1.1.0
|
||||
idna==2.6
|
||||
iso8601==0.1.11
|
||||
Jinja2==2.10
|
||||
|
|
|
@ -324,11 +324,11 @@ def update_headers(headers, api_version):
|
|||
def check_headers(response, api_version):
|
||||
"""Checks that microversion header is in response."""
|
||||
if api_version.ver_minor > 0:
|
||||
if (api_version.ver_minor < 27
|
||||
and LEGACY_HEADER_NAME not in response.headers):
|
||||
if (api_version.ver_minor < 27 and
|
||||
LEGACY_HEADER_NAME not in response.headers):
|
||||
_warn_missing_microversion_header(LEGACY_HEADER_NAME)
|
||||
elif (api_version.ver_minor >= 27
|
||||
and HEADER_NAME not in response.headers):
|
||||
elif (api_version.ver_minor >= 27 and
|
||||
HEADER_NAME not in response.headers):
|
||||
_warn_missing_microversion_header(HEADER_NAME)
|
||||
|
||||
|
||||
|
|
|
@ -30,9 +30,6 @@ from keystoneauth1 import session as ksession
|
|||
from oslo_utils import importutils
|
||||
import pkg_resources
|
||||
|
||||
osprofiler_profiler = importutils.try_import("osprofiler.profiler")
|
||||
osprofiler_web = importutils.try_import("osprofiler.web")
|
||||
|
||||
import novaclient
|
||||
from novaclient import api_versions
|
||||
from novaclient import exceptions
|
||||
|
@ -40,6 +37,9 @@ from novaclient import extension as ext
|
|||
from novaclient.i18n import _
|
||||
from novaclient import utils
|
||||
|
||||
osprofiler_profiler = importutils.try_import("osprofiler.profiler")
|
||||
osprofiler_web = importutils.try_import("osprofiler.web")
|
||||
|
||||
# TODO(jichenjc): when an extension in contrib is moved to core extension,
|
||||
# Add the name into the following list, then after last patch merged,
|
||||
# remove the whole function
|
||||
|
|
|
@ -29,8 +29,6 @@ from oslo_utils import importutils
|
|||
from oslo_utils import strutils
|
||||
import six
|
||||
|
||||
osprofiler_profiler = importutils.try_import("osprofiler.profiler")
|
||||
|
||||
import novaclient
|
||||
from novaclient import api_versions
|
||||
from novaclient import client
|
||||
|
@ -39,6 +37,8 @@ import novaclient.extension
|
|||
from novaclient.i18n import _
|
||||
from novaclient import utils
|
||||
|
||||
osprofiler_profiler = importutils.try_import("osprofiler.profiler")
|
||||
|
||||
DEFAULT_MAJOR_OS_COMPUTE_API_VERSION = "2.0"
|
||||
# The default behaviour of nova client CLI is that CLI negotiates with server
|
||||
# to find out the most recent version between client and server, and
|
||||
|
|
|
@ -87,8 +87,8 @@ class Fixture(base.Fixture):
|
|||
headers=headers)
|
||||
|
||||
self.requests_mock.get(self.url(all_projects=True),
|
||||
json={'server_groups': server_groups
|
||||
+ other_project_server_groups},
|
||||
json={'server_groups': server_groups +
|
||||
other_project_server_groups},
|
||||
headers=headers)
|
||||
|
||||
self.requests_mock.get(self.url(limit=2, offset=1),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# The order of packages is significant, because pip processes them in the order
|
||||
# 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,<0.14,>=0.12.0 # Apache-2.0
|
||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||
|
||||
bandit>=1.1.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -93,7 +93,7 @@ commands =
|
|||
# Following checks are ignored on purpose.
|
||||
#
|
||||
# Additional checks are also ignored on purpose: F811, F821
|
||||
ignore = F811,F821,H404,H405
|
||||
ignore = E731,F811,F821,H404,H405
|
||||
show-source = True
|
||||
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py,releasenotes
|
||||
|
||||
|
|
Loading…
Reference in New Issue