From d17a4cb0378b89f2e3e949e708577bd353cd4363 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 15 Jun 2014 20:45:15 -0400 Subject: [PATCH] Fixed several flake8 errors --- django/db/migrations/autodetector.py | 6 +++--- django/db/migrations/optimizer.py | 4 ++-- tests/migrations/test_operations.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py index 735b77441a..1fd28f6ad9 100644 --- a/django/db/migrations/autodetector.py +++ b/django/db/migrations/autodetector.py @@ -425,7 +425,7 @@ class MigrationAutodetector(object): options=model_state.options, bases=model_state.bases, ), - dependencies = dependencies, + dependencies=dependencies, ) # Generate operations for each related field for name, field in sorted(related_fields.items()): @@ -524,7 +524,7 @@ class MigrationAutodetector(object): bases=model_state.bases, ), # Depend on the deletion of any possible non-proxy version of us - dependencies = dependencies, + dependencies=dependencies, ) def generate_deleted_models(self): @@ -815,7 +815,7 @@ class MigrationAutodetector(object): name=model_name, order_with_respect_to=new_model_state.options.get('order_with_respect_to', None), ), - dependencies = dependencies, + dependencies=dependencies, ) def arrange_for_graph(self, changes, graph): diff --git a/django/db/migrations/optimizer.py b/django/db/migrations/optimizer.py index 342b88e99d..8e285c8b76 100644 --- a/django/db/migrations/optimizer.py +++ b/django/db/migrations/optimizer.py @@ -163,8 +163,8 @@ class MigrationOptimizer(object): """ Folds a CreateModel and a DeleteModel into nothing. """ - if operation.name.lower() == other.name.lower() and \ - not operation.options.get("proxy", False): + if (operation.name.lower() == other.name.lower() and + not operation.options.get("proxy", False)): return [] def reduce_model_alter_delete(self, operation, other, in_between): diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index 9f5cad0391..886d35e822 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -237,8 +237,8 @@ class OperationTests(MigrationTestBase): operation = migrations.CreateModel( "ProxyPony", [], - options = {"proxy": True}, - bases = ("test_crprmo.Pony", ), + options={"proxy": True}, + bases=("test_crprmo.Pony", ), ) new_state = project_state.clone() operation.state_forwards("test_crprmo", new_state)