Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Ia932544d2491ca86e8b3edc6d794b24c12e1f8f9
This commit is contained in:
zhulingjie 2019-01-05 01:08:34 +08:00
parent 307b09bf9d
commit e709ed34c8
5 changed files with 11 additions and 9 deletions

View File

@ -1,4 +1,4 @@
openstack Style Commandments openstack Style Commandments
=============================================== ============================
Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking<0.13,>=0.12.0 # Apache-2.0 hacking>=1.1.0,<1.2.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.24.0 # Apache-2.0 openstackdocstheme>=1.24.0 # Apache-2.0

View File

@ -49,8 +49,9 @@ commands = oslo_debug_helper {posargs}
[flake8] [flake8]
# E123, E125 skipped as they are invalid PEP-8. # E123, E125 skipped as they are invalid PEP-8.
# E731 skipped as assign a lambda expression
show-source = True show-source = True
ignore = E123,E125 ignore = E123,E125,E731
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build

View File

@ -140,10 +140,11 @@ class BaseRcaTest(BaseAlarmsTest):
for item in links: for item in links:
source_alarm_name = alarms[item['source']].get(VProps.NAME) source_alarm_name = alarms[item['source']].get(VProps.NAME)
target_alarm_name = alarms[item['target']].get(VProps.NAME) target_alarm_name = alarms[item['target']].get(VProps.NAME)
if item.get('key') != EdgeLabel.CAUSES \ relationship_type = item.get(EdgeProperties.RELATIONSHIP_TYPE)
or item.get(EdgeProperties.RELATIONSHIP_TYPE) != EdgeLabel.CAUSES \ if (item.get('key') != EdgeLabel.CAUSES or
or source_alarm_name != RCA_ALARM_NAME \ relationship_type != EdgeLabel.CAUSES or
or target_alarm_name != VITRAGE_ALARM_NAME: source_alarm_name != RCA_ALARM_NAME or
target_alarm_name != VITRAGE_ALARM_NAME):
flag = False flag = False
self.assertThat(alarms, matchers.HasLength(3)) self.assertThat(alarms, matchers.HasLength(3))

View File

@ -222,8 +222,8 @@ class TestLongProcessing(TestActionsBase):
try: try:
v_utils.generate_fake_host_alarm( v_utils.generate_fake_host_alarm(
'nova.host-0-nova.zone-0-openstack.cluster-0', 'nova.host-0-nova.zone-0-openstack.cluster-0',
'test_high_availability_events' 'test_high_availability_events' +
+ str(self.num_of_sent_events)) str(self.num_of_sent_events))
self.num_of_sent_events += 1 self.num_of_sent_events += 1
time.sleep(spacing) time.sleep(spacing)
except Exception: except Exception: