Skip to content

Filename strategy

mongorunway.application.ports.filename_strategy ¤

__all__: typing.Sequence[str] = ('FilenameStrategy') module-attribute ¤

FilenameStrategy ¤

Bases: abc.ABC

Source code in mongorunway\application\ports\filename_strategy.py
class FilenameStrategy(abc.ABC):
    __slots__: typing.Sequence[str] = ()

    @abc.abstractmethod
    def is_valid_filename(self, filename: str, /) -> bool:
        ...

    @abc.abstractmethod
    def transform_migration_filename(self, filename: str, position: int) -> str:
        ...

__slots__: typing.Sequence[str] = () instance-attribute class-attribute ¤

is_valid_filename(filename) abstractmethod ¤

Source code in mongorunway\application\ports\filename_strategy.py
@abc.abstractmethod
def is_valid_filename(self, filename: str, /) -> bool:
    ...

transform_migration_filename(filename, position) abstractmethod ¤

Source code in mongorunway\application\ports\filename_strategy.py
@abc.abstractmethod
def transform_migration_filename(self, filename: str, position: int) -> str:
    ...