Skip to content

mixin

dandy.core.service.mixin

T = TypeVar('T') module-attribute

BaseServiceMixin

Bases: ABC

__init_subclass__

Source code in dandy/core/service/mixin.py
def __init_subclass__(cls) -> None:
    super().__init_subclass__()
    for attr in cls._required_attrs:
        if getattr(cls, attr) is None:
            message = f'"{cls.__name__}.{attr}" is not set'
            raise ServiceCriticalError(message)

reset abstractmethod

Cannot use NotImplementedError do to call chain

Source code in dandy/core/service/mixin.py
@abstractmethod
def reset(self) -> None:
    """Cannot use NotImplementedError do to call chain"""