Bump to 2.2.1 and black some files

This commit is contained in:
David-Wobrock committed 2020-05-16 21:16:36 +02:00
1 parent 50bbed4a1a
commit a5e17d0df1
6 files changed
+15 -14

No files matched your search

+5
View File
@@ -1,3 +1,8 @@
## 2.2.1
Fixed bug:
* Correctly detect `apps.get_models` when on multiple lines in data migration
## 2.2.0
* Make summary output more friendly (Thanks to @vald-phoenix)
+1 -1
View File
@@ -1,6 +1,6 @@
from appdirs import user_cache_dir
__version__ = "2.2.0"
__version__ = "2.2.1"
DEFAULT_CACHE_PATH = user_cache_dir("django-migration-linter", version=__version__)
+4
View File
@@ -79,8 +79,12 @@ class DataMigrationDetectionTestCase(unittest.TestCase):
def test_correct_get_model_import(self):
def correct_importing_model_forward(apps, schema_editor):
MyModel = apps.get_model("app_data_migrations", "MyModel")
MyVeryLongLongLongModel = apps.get_model(
"app_data_migrations", "MyVeryLongLongLongModel"
)
MyModel.objects.filter(id=1).first()
MyVeryLongLongLongModel.objects.filter(id=1).first()
issues = MigrationLinter.get_data_migration_model_import_issues(
correct_importing_model_forward
@@ -24,5 +24,5 @@ class Migration(migrations.Migration):
),
("myfield", models.IntegerField()),
],
),
)
]
@@ -9,10 +9,6 @@ def update_things(apps, schema_editor):
class Migration(migrations.Migration):
dependencies = [
("app_data_migrations", "0001_initial"),
]
dependencies = [("app_data_migrations", "0001_initial")]
operations = [
migrations.RunPython(update_things),
]
operations = [migrations.RunPython(update_things)]
@@ -13,10 +13,6 @@ def forward_weird_name(arg1, arg2):
class Migration(migrations.Migration):
dependencies = [
("app_data_migrations", "0002_missing_reverse"),
]
dependencies = [("app_data_migrations", "0002_missing_reverse")]
operations = [
migrations.RunPython(forward_weird_name, backward_weirdly_named),
]
operations = [migrations.RunPython(forward_weird_name, backward_weirdly_named)]