Update hacking version

Change-Id: If8e7f2721f2c6f426dce0d9278ba066fa18d7ea1
This commit is contained in:
zhouxinyong 2019-01-26 11:39:57 +08:00 committed by Lucian Petrut
parent b69b91df5c
commit 2368188b8b
4 changed files with 9 additions and 5 deletions

View File

@ -97,9 +97,9 @@ class ClusterLiveMigrationOps(livemigrationops.LiveMigrationOps):
instance.name)
node_name = self._clustutils.get_node_name()
if (state_info['owner_node'].lower() != node_name.lower()
or state_info['state'] != expected_state
or state_info['migration_queued']):
if (state_info['owner_node'].lower() != node_name.lower() or
state_info['state'] != expected_state or
state_info['migration_queued']):
instance.vm_state = vm_states.ERROR
instance.save()

View File

@ -64,6 +64,7 @@ def _patch_mock_to_raise_for_invalid_assert_calls():
mock.Mock.__getattr__ = raise_for_invalid_assert_calls(
mock.Mock.__getattr__)
# NOTE(gibi): needs to be called only once at import time
# to patch the mock lib
_patch_mock_to_raise_for_invalid_assert_calls()

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.13,>=0.12.0 # Apache-2.0
hacking>=2.0<2.1 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT

View File

@ -67,8 +67,11 @@ commands =
# The rest of the ignores are TODOs
# New from hacking 0.9: E129, E131, H407, H405
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
# We'll skip E402 so that we can still call certain functions before importing
# modules (e.g. eventlet.monkey_patch()).
# W504 skipped since you must choose either W503 or W504 (they conflict)
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,E402,H405,W504,W605
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools/xenserver*
# To get a list of functions that are more complex than 25, set max-complexity
# to 25 and run 'tox -epep8'.