[1.7.x] Removed unused imports in makemigrations

Backport of fc32e9c0d from master.
This commit is contained in:
Claude Paroz 2014-05-08 19:39:09 +02:00
parent f2bf59a5bc
commit 189bcb9b09
1 changed files with 2 additions and 3 deletions

View File

@ -5,8 +5,7 @@ from optparse import make_option
from django.apps import apps from django.apps import apps
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand, CommandError
from django.db import connections, DEFAULT_DB_ALIAS, migrations from django.db.migrations import Migration
from django.db.migrations.migration import Migration
from django.db.migrations.loader import MigrationLoader from django.db.migrations.loader import MigrationLoader
from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.autodetector import MigrationAutodetector
from django.db.migrations.questioner import MigrationQuestioner, InteractiveMigrationQuestioner from django.db.migrations.questioner import MigrationQuestioner, InteractiveMigrationQuestioner
@ -194,7 +193,7 @@ class Command(BaseCommand):
biggest_number = max([x for x in numbers if x is not None]) biggest_number = max([x for x in numbers if x is not None])
except ValueError: except ValueError:
biggest_number = 1 biggest_number = 1
subclass = type("Migration", (migrations.Migration, ), { subclass = type("Migration", (Migration, ), {
"dependencies": [(app_label, migration.name) for migration in merge_migrations], "dependencies": [(app_label, migration.name) for migration in merge_migrations],
}) })
new_migration = subclass("%04i_merge" % (biggest_number + 1), app_label) new_migration = subclass("%04i_merge" % (biggest_number + 1), app_label)