Fixed several flake8 errors

This commit is contained in:
Alex Gaynor 2014-06-15 20:45:15 -04:00
parent d7576bb27a
commit d17a4cb037
3 changed files with 7 additions and 7 deletions

View File

@ -425,7 +425,7 @@ class MigrationAutodetector(object):
options=model_state.options, options=model_state.options,
bases=model_state.bases, bases=model_state.bases,
), ),
dependencies = dependencies, dependencies=dependencies,
) )
# Generate operations for each related field # Generate operations for each related field
for name, field in sorted(related_fields.items()): for name, field in sorted(related_fields.items()):
@ -524,7 +524,7 @@ class MigrationAutodetector(object):
bases=model_state.bases, bases=model_state.bases,
), ),
# Depend on the deletion of any possible non-proxy version of us # Depend on the deletion of any possible non-proxy version of us
dependencies = dependencies, dependencies=dependencies,
) )
def generate_deleted_models(self): def generate_deleted_models(self):
@ -815,7 +815,7 @@ class MigrationAutodetector(object):
name=model_name, name=model_name,
order_with_respect_to=new_model_state.options.get('order_with_respect_to', None), 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): def arrange_for_graph(self, changes, graph):

View File

@ -163,8 +163,8 @@ class MigrationOptimizer(object):
""" """
Folds a CreateModel and a DeleteModel into nothing. Folds a CreateModel and a DeleteModel into nothing.
""" """
if operation.name.lower() == other.name.lower() and \ if (operation.name.lower() == other.name.lower() and
not operation.options.get("proxy", False): not operation.options.get("proxy", False)):
return [] return []
def reduce_model_alter_delete(self, operation, other, in_between): def reduce_model_alter_delete(self, operation, other, in_between):

View File

@ -237,8 +237,8 @@ class OperationTests(MigrationTestBase):
operation = migrations.CreateModel( operation = migrations.CreateModel(
"ProxyPony", "ProxyPony",
[], [],
options = {"proxy": True}, options={"proxy": True},
bases = ("test_crprmo.Pony", ), bases=("test_crprmo.Pony", ),
) )
new_state = project_state.clone() new_state = project_state.clone()
operation.state_forwards("test_crprmo", new_state) operation.state_forwards("test_crprmo", new_state)