]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Enable hacking rule E111,E112,E113
authorZhiteng Huang <zhithuang@ebaysf.com>
Fri, 27 Jun 2014 10:44:41 +0000 (18:44 +0800)
committerZhiteng Huang <zhithuang@ebaysf.com>
Fri, 27 Jun 2014 10:44:41 +0000 (18:44 +0800)
This change fixes all violations of E111, E112, E113 hacking rules
and enable these rules in tox.ini

Change-Id: I79b1f2f26fbbec4ad47230ca2e8a2802458a6cee

bin/cinder-manage
cinder/tests/test_gpfs.py
cinder/tests/test_migrations.py
cinder/volume/drivers/hds/iscsi.py
tox.ini

index c9eec4ad99fbb6c626cd8bb25175098778a79a53..830b09c9e55fa44bb02ec104d61cfb99f8c18d30 100755 (executable)
@@ -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:]
index 8637be815e128e52537a3b172a1bc2a204e1c1f8..bc71600f2e68bd910273aac3b138b5055a1d1870 100644 (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 + '_')
index d3ec208f3248022752e067d752c56c1e770bfd40..156fdc36260d8cddda73ecdc14f67ee5175a03cd 100644 (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,
index 2908c842408a08bdd035215859c082f846b5a381..827b18f1c18ffe09010b419d2f5f2f8b67edea2a 100644 (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'],
diff --git a/tox.ini b/tox.ini
index 44931e3a3d3f82bec7f03a312321e474a93522ba..ae8c95fd6c39591add71b95d5210588add55e8c3 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -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