(target: str | None, app_labels: Sequence[str])
| 63 | |
| 64 | |
| 65 | def _parse_targets(target: str | None, app_labels: Sequence[str]) -> list[MigrationTarget]: |
| 66 | if not target: |
| 67 | return [MigrationTarget(app_label=label, name="__latest__") for label in app_labels] |
| 68 | if "." in target: |
| 69 | app_label, name = target.split(".", 1) |
| 70 | if app_label not in app_labels: |
| 71 | raise ValueError(f"Unknown app label {app_label}") |
| 72 | return [MigrationTarget(app_label=app_label, name=name)] |
| 73 | if target not in app_labels: |
| 74 | raise ValueError(f"Unknown app label {target}") |
| 75 | return [MigrationTarget(app_label=target, name="__latest__")] |
no test coverage detected
searching dependent graphs…