Bump to 2.2.1 and black some files
This commit is contained in:
1 parent
50bbed4a1a
commit
a5e17d0df1
6 files changed
+15
-14
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
## 2.2.1
|
||||||
|
|
||||||
|
Fixed bug:
|
||||||
|
* Correctly detect `apps.get_models` when on multiple lines in data migration
|
||||||
|
|
||||||
## 2.2.0
|
## 2.2.0
|
||||||
|
|
||||||
* Make summary output more friendly (Thanks to @vald-phoenix)
|
* Make summary output more friendly (Thanks to @vald-phoenix)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from appdirs import user_cache_dir
|
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__)
|
DEFAULT_CACHE_PATH = user_cache_dir("django-migration-linter", version=__version__)
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,12 @@ class DataMigrationDetectionTestCase(unittest.TestCase):
|
|||||||
def test_correct_get_model_import(self):
|
def test_correct_get_model_import(self):
|
||||||
def correct_importing_model_forward(apps, schema_editor):
|
def correct_importing_model_forward(apps, schema_editor):
|
||||||
MyModel = apps.get_model("app_data_migrations", "MyModel")
|
MyModel = apps.get_model("app_data_migrations", "MyModel")
|
||||||
|
MyVeryLongLongLongModel = apps.get_model(
|
||||||
|
"app_data_migrations", "MyVeryLongLongLongModel"
|
||||||
|
)
|
||||||
|
|
||||||
MyModel.objects.filter(id=1).first()
|
MyModel.objects.filter(id=1).first()
|
||||||
|
MyVeryLongLongLongModel.objects.filter(id=1).first()
|
||||||
|
|
||||||
issues = MigrationLinter.get_data_migration_model_import_issues(
|
issues = MigrationLinter.get_data_migration_model_import_issues(
|
||||||
correct_importing_model_forward
|
correct_importing_model_forward
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ class Migration(migrations.Migration):
|
|||||||
),
|
),
|
||||||
("myfield", models.IntegerField()),
|
("myfield", models.IntegerField()),
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
]
|
]
|
||||||
@@ -9,10 +9,6 @@ def update_things(apps, schema_editor):
|
|||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [("app_data_migrations", "0001_initial")]
|
||||||
("app_data_migrations", "0001_initial"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
operations = [migrations.RunPython(update_things)]
|
||||||
migrations.RunPython(update_things),
|
|
||||||
]
|
|
||||||
@@ -13,10 +13,6 @@ def forward_weird_name(arg1, arg2):
|
|||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [("app_data_migrations", "0002_missing_reverse")]
|
||||||
("app_data_migrations", "0002_missing_reverse"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
operations = [migrations.RunPython(forward_weird_name, backward_weirdly_named)]
|
||||||
migrations.RunPython(forward_weird_name, backward_weirdly_named),
|
|
||||||
]
|
|
||||||
Reference in new issue
Block a user