Enable hacking rule E111,E112,E113

This change fixes all violations of E111, E112, E113 hacking rules
and enable these rules in tox.ini

Change-Id: I79b1f2f26fbbec4ad47230ca2e8a2802458a6cee
This commit is contained in:
Zhiteng Huang 2014-06-27 18:44:41 +08:00
parent 9edb49f0fb
commit 9dace0d3f9
5 changed files with 9 additions and 9 deletions

View File

@ -484,9 +484,9 @@ category_opt = cfg.SubCommandOpt('category',
def get_arg_string(args):
arg = None
if args[0] == '-':
# (Note)zhiteng: args starts with FLAGS.oparser.prefix_chars
# is optional args. Notice that cfg module takes care of
# actual ArgParser so prefix_chars is always '-'.
# (Note)zhiteng: args starts with FLAGS.oparser.prefix_chars
# is optional args. Notice that cfg module takes care of
# actual ArgParser so prefix_chars is always '-'.
if args[1] == '-':
# This is long optional arg
arg = args[2:]

View File

@ -558,7 +558,7 @@ class GPFSDriverTestCase(test.TestCase):
gpfs_images_share_mode=org_value_share_mode)
CONF.gpfs_images_dir = org_value_dir
# fail directory.startswith('/')
# fail directory.startswith('/')
org_value_mount = self.driver.configuration.gpfs_mount_point_base
self.flags(volume_driver=self.driver_name,
gpfs_mount_point_base='_' + self.volumes_path)
@ -573,7 +573,7 @@ class GPFSDriverTestCase(test.TestCase):
gpfs_mount_point_base=org_value_mount)
CONF.gpfs_images_dir = org_value_dir
# fail os.path.isdir(directory)
# fail os.path.isdir(directory)
org_value_mount = self.driver.configuration.gpfs_mount_point_base
self.flags(volume_driver=self.driver_name,
gpfs_mount_point_base=self.volumes_path + '_')

View File

@ -859,7 +859,7 @@ class TestMigrations(test.TestCase):
def test_migration_017(self):
"""Test that added encryption information works correctly."""
# upgrade schema
# upgrade schema
for (key, engine) in self.engines.items():
migration_api.version_control(engine,
TestMigrations.REPOSITORY,

View File

@ -169,7 +169,7 @@ class HDSISCSIDriver(driver.ISCSIDriver):
# dict based on iSCSI portal ip addresses
conf = {}
for line in lines:
# only record up links
# only record up links
if 'CTL' in line and 'Up' in line:
inf = line.split()
(ctl, port, ip, ipp) = (inf[1], inf[3], inf[5], inf[7])
@ -510,7 +510,7 @@ class HDSISCSIDriver(driver.ISCSIDriver):
(arid, lun) = info['id_lu']
if 'tgt' in info.keys(): # connected?
LOG.info("delete lun loc %s" % info['tgt'])
# loc = id.lun
# loc = id.lun
(_portal, iqn, loc, ctl, port, hlun) = info['tgt']
self.bend.del_iscsi_conn(self.config['hnas_cmd'],
self.config['mgmt_ip0'],

View File

@ -50,7 +50,7 @@ commands = {posargs}
# Due to hacking 0.9.2 following checking are ignored on purpose for now
# E111,E112,E113,E121,E122,E123,E126,E128,E251,E265
# E713,F403,F841,H302,H305,H307,H402,H405,H803,H904
ignore = E111,E112,E113,E121,E122,E123,E126,E128,E251,E265,E711,E712,E713,F402,F841,H104,H302,H305,H307,H402,H405,H803,H904
ignore = E121,E122,E123,E126,E128,E251,E265,E711,E712,E713,F402,F841,H104,H302,H305,H307,H402,H405,H803,H904
builtins = _
exclude = .git,.venv,.tox,dist,tools,doc,common,*egg,build