Fixed three small flake8 violations.

This commit is contained in:
Alex Gaynor 2014-03-04 15:13:15 -08:00
parent 3e25c8ac69
commit a248c88372
3 changed files with 4 additions and 3 deletions

View File

@ -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(

View File

@ -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.

View File

@ -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):