From a248c88372fa445c1159511fae2b98208f149f69 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 4 Mar 2014 15:13:15 -0800 Subject: [PATCH] Fixed three small flake8 violations. --- django/db/migrations/state.py | 2 +- tests/migrations/test_operations.py | 1 + tests/modeladmin/tests.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py index 90226221be..ab2bd8e6d8 100644 --- a/django/db/migrations/state.py +++ b/django/db/migrations/state.py @@ -166,7 +166,7 @@ class ModelState(object): # __bases__ we may end up with duplicates and ordering issues, we # therefore discard any duplicates and reorder the bases according # to their index in the MRO. - flattened_bases = sorted(set(flatten_bases(model)), key=lambda x:model.__mro__.index(x)) + flattened_bases = sorted(set(flatten_bases(model)), key=lambda x: model.__mro__.index(x)) # Make our record bases = tuple( diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index debfc760b5..da55d7d7d1 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -582,6 +582,7 @@ class OperationTests(MigrationTestBase): self.assertEqual(project_state.render().get_model("test_runpython", "Pony").objects.count(), 6) self.assertEqual(project_state.render().get_model("test_runpython", "ShetlandPony").objects.count(), 2) + class MigrateNothingRouter(object): """ A router that sends all writes to the other database. diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index 146c078e59..205e1dc8cf 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -867,8 +867,8 @@ class RadioFieldsCheckTests(CheckTestCase): self.assertIsInvalid( ValidationTestModelAdmin, ValidationTestModel, - ("The value of 'radio_fields' refers to 'name', which is not an instance " - "of ForeignKey, and does not have a 'choices' definition."), + ("The value of 'radio_fields' refers to 'name', which is not an instance " + "of ForeignKey, and does not have a 'choices' definition."), 'admin.E023') def test_invalid_value(self):