diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py index c0ac4b7f44..48166a1bdb 100644 --- a/django/db/migrations/loader.py +++ b/django/db/migrations/loader.py @@ -5,9 +5,6 @@ import sys from django.apps import apps from django.db.migrations.recorder import MigrationRecorder from django.db.migrations.graph import MigrationGraph -from django.db.migrations.migration import Migration -from django.db.migrations.state import ModelState -from django.db.migrations import operations from django.utils import six from django.conf import settings diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 4c98e7f8be..d3d7699dec 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -196,7 +196,7 @@ def translation(language): Returns a translation object. """ global _translations - if not language in _translations: + if language not in _translations: _translations[language] = DjangoTranslation(language) return _translations[language] diff --git a/tests/migrations/test_state.py b/tests/migrations/test_state.py index afd2f8b8b9..ab65630105 100644 --- a/tests/migrations/test_state.py +++ b/tests/migrations/test_state.py @@ -347,6 +347,7 @@ class StateTests(TestCase): class TestModel(models.Model): ct = models.ForeignKey("contenttypes.ContentType") + class Meta: app_label = "migrations" apps = new_apps