Fix PEP8 E121 & E122 errors
Fix PEP8 E121 & E122 errors E121: continuation line under-indented for hanging indent E122: continuation line missing indentation or outdented Remove E121 & E122 from the ignore list for flake8 Change-Id: If63dd80ee85fc97596492e0b2cb6db9e10458c54
This commit is contained in:
@@ -44,7 +44,7 @@ VERBS = {
|
||||
'manage': 'manage',
|
||||
'provide': 'provide',
|
||||
'inspect': 'inspect',
|
||||
}
|
||||
}
|
||||
""" Mapping of state-changing events that are PUT to the REST API
|
||||
|
||||
This is a mapping of target states which are PUT to the API, eg,
|
||||
|
||||
@@ -148,30 +148,30 @@ class IPMINativePrivateMethodTestCase(db_base.DbTestCase):
|
||||
ipmicmd.get_sensor_data.return_value = readings
|
||||
expected = {
|
||||
'fake_type_A': {
|
||||
'fake_name1': {
|
||||
'Health': '0',
|
||||
'Sensor ID': 'fake_name1',
|
||||
'Sensor Reading': 'fake_value1 fake_units',
|
||||
'States': '[]',
|
||||
'Units': 'fake_units'
|
||||
},
|
||||
'fake_name2': {
|
||||
'Health': '0',
|
||||
'Sensor ID': 'fake_name2',
|
||||
'Sensor Reading': 'fake_value2 fake_units',
|
||||
'States': '[]',
|
||||
'Units': 'fake_units'
|
||||
}
|
||||
'fake_name1': {
|
||||
'Health': '0',
|
||||
'Sensor ID': 'fake_name1',
|
||||
'Sensor Reading': 'fake_value1 fake_units',
|
||||
'States': '[]',
|
||||
'Units': 'fake_units'
|
||||
},
|
||||
'fake_name2': {
|
||||
'Health': '0',
|
||||
'Sensor ID': 'fake_name2',
|
||||
'Sensor Reading': 'fake_value2 fake_units',
|
||||
'States': '[]',
|
||||
'Units': 'fake_units'
|
||||
}
|
||||
},
|
||||
'fake_type_B': {
|
||||
'fake_name3': {
|
||||
'Health': '0',
|
||||
'Sensor ID': 'fake_name3',
|
||||
'Sensor Reading': 'fake_value3 fake_units',
|
||||
'States': '[]', 'Units': 'fake_units'
|
||||
}
|
||||
'fake_name3': {
|
||||
'Health': '0',
|
||||
'Sensor ID': 'fake_name3',
|
||||
'Sensor Reading': 'fake_value3 fake_units',
|
||||
'States': '[]', 'Units': 'fake_units'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = ipminative._get_sensors_data(self.info)
|
||||
self.assertEqual(expected, ret)
|
||||
|
||||
@@ -192,15 +192,15 @@ class IPMINativePrivateMethodTestCase(db_base.DbTestCase):
|
||||
|
||||
expected = {
|
||||
'fake_type_A': {
|
||||
'fake_name1': {
|
||||
'Health': '0',
|
||||
'Sensor ID': 'fake_name1',
|
||||
'Sensor Reading': 'fake_value1 fake_units',
|
||||
'States': '[]',
|
||||
'Units': 'fake_units'
|
||||
}
|
||||
'fake_name1': {
|
||||
'Health': '0',
|
||||
'Sensor ID': 'fake_name1',
|
||||
'Sensor Reading': 'fake_value1 fake_units',
|
||||
'States': '[]',
|
||||
'Units': 'fake_units'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = ipminative._get_sensors_data(self.info)
|
||||
self.assertEqual(expected, ret)
|
||||
|
||||
|
||||
@@ -484,8 +484,7 @@ class IPMIToolPrivateMethodTestCase(db_base.DbTestCase):
|
||||
'-U', self.info['username'],
|
||||
'-f', file_handle1,
|
||||
'A', 'B', 'C',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'ipmitool',
|
||||
'-I', 'lanplus',
|
||||
'-H', self.info['address'],
|
||||
@@ -529,8 +528,7 @@ class IPMIToolPrivateMethodTestCase(db_base.DbTestCase):
|
||||
'-U', self.info['username'],
|
||||
'-f', file_handle1,
|
||||
'A', 'B', 'C',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'ipmitool',
|
||||
'-I', 'lanplus',
|
||||
'-H', self.info['address'],
|
||||
@@ -576,8 +574,7 @@ class IPMIToolPrivateMethodTestCase(db_base.DbTestCase):
|
||||
'-U', self.info['username'],
|
||||
'-f', file_handle1,
|
||||
'A', 'B', 'C',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'ipmitool',
|
||||
'-I', 'lanplus',
|
||||
'-H', '127.127.127.127',
|
||||
@@ -1495,7 +1492,7 @@ class IPMIToolDriverTestCase(db_base.DbTestCase):
|
||||
'Negative Hysteresis': '375.000',
|
||||
'Sensor ID': 'FAN MOD 1A RPM (0x30)',
|
||||
'Nominal Reading': '5325.000'
|
||||
}
|
||||
}
|
||||
},
|
||||
'Temperature': {
|
||||
'Temp (0x2)': {
|
||||
|
||||
@@ -36,7 +36,7 @@ class DriverLoadTestCase(base.TestCase):
|
||||
def _fake_init_driver_err(self, *args, **kwargs):
|
||||
kwargs['on_load_failure_callback'](None, FakeEp,
|
||||
exception.DriverLoadError(
|
||||
driver='aaa', reason='bbb'))
|
||||
driver='aaa', reason='bbb'))
|
||||
|
||||
def test_driver_load_error_if_driver_enabled(self):
|
||||
self.config(enabled_drivers=['fake'])
|
||||
|
||||
@@ -301,8 +301,8 @@ class GenericUtilsTestCase(base.TestCase):
|
||||
|
||||
def test_get_shortened_ipv6(self):
|
||||
self.assertEqual("abcd:ef01:2345:6789:abcd:ef01:c0a8:fefe",
|
||||
utils.get_shortened_ipv6(
|
||||
"abcd:ef01:2345:6789:abcd:ef01:192.168.254.254"))
|
||||
utils.get_shortened_ipv6(
|
||||
"abcd:ef01:2345:6789:abcd:ef01:192.168.254.254"))
|
||||
self.assertEqual("::1", utils.get_shortened_ipv6(
|
||||
"0000:0000:0000:0000:0000:0000:0000:0001"))
|
||||
self.assertEqual("caca::caca:0:babe:201:102",
|
||||
|
||||
2
tox.ini
2
tox.ini
@@ -52,7 +52,7 @@ commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# E711: ignored because it is normal to use "column == None" in sqlalchemy
|
||||
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E711
|
||||
ignore = E123,E124,E125,E126,E127,E128,E129,E711
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,*ironic/nova*
|
||||
max-complexity=17
|
||||
|
||||
|
||||
Reference in New Issue
Block a user