Source code for clusterking.result

#!/usr/bin/env python3

# std
from abc import ABC, abstractmethod

# ours
from clusterking.util.log import get_logger
from import Data

[docs]class AbstractResult(ABC):
[docs] def __init__(self): pass
[docs]class DataResult(AbstractResult): """The result object represents the result of the execution of a :class:`~clusterking.worker.Worker` object on the :class:`` object. """
[docs] def __init__(self, data: Data): """Initializer of the object. .. note:: The :class:`~clusterking.result.Result` is not meant to be initialized by the user. Rather it is a return object of the :meth:`` method. """ super().__init__() self._data = data # type: Data self.log = get_logger(str(type(self)))
[docs] @abstractmethod def write(self, *args, **kwargs): """Write relevant data back to the :class:`` object that was passed to :meth:``. """ pass