File: exceptions.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 (12 lines) | stat: -rw-r--r-- 474 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from django_test_migrations.types import MigrationTarget


class MigrationNotInPlan(Exception):  # noqa: N818
    """``MigrationTarget`` not found in migrations plan."""

    def __init__(self, migration_target: MigrationTarget) -> None:  # noqa: D107
        self.migration_target = migration_target

    def __str__(self) -> str:
        """String representation of exception's instance."""
        return f'Migration {self.migration_target} not found in migrations plan'