File: migrations.py

package info (click to toggle)
python-django-test-migrations 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 436 kB
  • sloc: python: 1,479; makefile: 26
file content (8 lines) | stat: -rw-r--r-- 329 bytes parent folder | download
1
2
3
4
5
6
7
8
from django_test_migrations.types import MigrationSpec, MigrationTarget


def normalize(migration_target: MigrationSpec) -> list[MigrationTarget]:
    """Normalize ``migration_target`` to expected format."""
    if not isinstance(migration_target, list):
        migration_target = [migration_target]
    return migration_target