Permalink
Browse files

Fixing up some PEP8 violations

  • Loading branch information...
paltman committed Jul 4, 2012
1 parent 4398773 commit bc882e157aa53e297c090282a0d2e9a46f58e4f5
Showing with 17 additions and 10 deletions.
  1. +1 −1 .travis.yml
  2. +9 −4 nashvegas/management/commands/comparedb.py
  3. +2 −2 nashvegas/management/commands/upgradedb.py
  4. +5 −3 nashvegas/utils.py
View
@@ -11,7 +11,7 @@ install:
- pip install -q pep8 --use-mirrors
- pip install -q pyflakes --use-mirrors
script:
- - pep8 --ignore=E501,E225,E121,E123,E124,E125,E127,E128,W293,E702 nashvegas || exit 1
+ - pep8 --ignore=E501,W293,E702 nashvegas || exit 1
- pyflakes nashvegas || exit 1
- python runtests.py
notifications:
@@ -48,16 +48,21 @@ def handle(self, *args, **options):
command = NASHVEGAS.get("dumpdb", "pg_dump -s {dbname}")
print "Getting schema for current database..."
- current_sql = Popen(command.format(dbname=self.current_name),
- shell=True, stdout=PIPE).stdout.readlines()
+ current_sql = Popen(
+ command.format(dbname=self.current_name),
+ shell=True,
+ stdout=PIPE
+ ).stdout.readlines()
print "Getting schema for fresh database..."
self.setup_database()
connections[self.db].close()
connections[self.db].settings_dict["NAME"] = self.compare_name
call_command("syncdb", interactive=False, verbosity=0)
- new_sql = Popen(command.format(dbname=self.compare_name).split(),
- stdout=PIPE).stdout.readlines()
+ new_sql = Popen(
+ command.format(dbname=self.compare_name).split(),
+ stdout=PIPE
+ ).stdout.readlines()
connections[self.db].close()
connections[self.db].settings_dict["NAME"] = self.current_name
self.teardown_database()
@@ -16,8 +16,8 @@
from nashvegas.exceptions import MigrationError
from nashvegas.models import Migration
-from nashvegas.utils import get_sql_for_new_models, get_capable_databases, \
- get_pending_migrations
+from nashvegas.utils import get_sql_for_new_models, get_capable_databases
+from nashvegas.utils import get_pending_migrations
sys.path.append("migrations")
View
@@ -32,9 +32,11 @@ def get_sql_for_new_models(apps=None, using=DEFAULT_DB_ALIAS):
# Build the manifest of apps and models that are to be synchronized
all_models = [
- (app.__name__.split('.')[-2],
- [m for m in models.get_models(app, include_auto_created=True)
- if router.allow_syncdb(using, m)])
+ (app.__name__.split('.')[-2], [
+ m
+ for m in models.get_models(app, include_auto_created=True)
+ if router.allow_syncdb(using, m)
+ ])
for app in apps
]

0 comments on commit bc882e1

Please sign in to comment.