Make pep8 checks a bit stricter.

Along with moving to pep8 1.3.3, we also want to standardize
on what we ignore. This patch get's us most of the way there
by setting the ignore list to:
N4,E125, E126, E711,E712.

Almost all changes made here are white-space/indentation changes.

The removal of Hacking N4 errors from the ignore list will
be handled in a seperate patch.

Change-Id: If45f156600485d23769449018590f60b4f69b0c5
This commit is contained in:
John Griffith
2012-11-24 20:17:32 -07:00
parent 0fb98971a7
commit 51418bdd5b
127 changed files with 2754 additions and 2830 deletions

View File

@@ -76,7 +76,7 @@ def _have_mysql():
class TestMigrations(test.TestCase):
"""Test sqlalchemy-migrate migrations"""
"""Test sqlalchemy-migrate migrations."""
TEST_DATABASES = {}
DEFAULT_CONFIG_FILE = os.path.join(os.path.dirname(__file__),
@@ -87,7 +87,7 @@ class TestMigrations(test.TestCase):
DEFAULT_CONFIG_FILE)
MIGRATE_FILE = cinder.db.sqlalchemy.migrate_repo.__file__
REPOSITORY = repository.Repository(
os.path.abspath(os.path.dirname(MIGRATE_FILE)))
os.path.abspath(os.path.dirname(MIGRATE_FILE)))
def setUp(self):
super(TestMigrations, self).setUp()
@@ -256,11 +256,12 @@ class TestMigrations(test.TestCase):
# upgrades successfully.
# Place the database under version control
migration_api.version_control(engine, TestMigrations.REPOSITORY,
migration.INIT_VERSION)
migration_api.version_control(engine,
TestMigrations.REPOSITORY,
migration.INIT_VERSION)
self.assertEqual(migration.INIT_VERSION,
migration_api.db_version(engine,
TestMigrations.REPOSITORY))
migration_api.db_version(engine,
TestMigrations.REPOSITORY))
migration_api.upgrade(engine, TestMigrations.REPOSITORY,
migration.INIT_VERSION + 1)
@@ -268,7 +269,7 @@ class TestMigrations(test.TestCase):
LOG.debug('latest version is %s' % TestMigrations.REPOSITORY.latest)
for version in xrange(migration.INIT_VERSION + 2,
TestMigrations.REPOSITORY.latest + 1):
TestMigrations.REPOSITORY.latest + 1):
# upgrade -> downgrade -> upgrade
self._migrate_up(engine, version)
if snake_walk:
@@ -300,5 +301,5 @@ class TestMigrations(test.TestCase):
TestMigrations.REPOSITORY,
version)
self.assertEqual(version,
migration_api.db_version(engine,
TestMigrations.REPOSITORY))
migration_api.db_version(engine,
TestMigrations.REPOSITORY))