diff --git a/medkit/core/operation.py b/medkit/core/operation.py index 29057a28..9ed58dd1 100644 --- a/medkit/core/operation.py +++ b/medkit/core/operation.py @@ -34,22 +34,15 @@ class Operation(abc.ABC): >>> super().__init__(**init_args) """ - uid: str - _description: OperationDescription | None = None _prov_tracer: ProvTracer | None = None @abc.abstractmethod def __init__(self, uid: str | None = None, name: str | None = None, **kwargs): - if uid is None: - uid = generate_id() - if name is None: - name = self.__class__.__name__ - - self.uid = uid + self.uid = uid | generate_id() self._description = OperationDescription( uid=self.uid, class_name=self.__class__.__name__, - name=name, + name=name | self.__class__.__name__, config=kwargs, ) @@ -68,9 +61,9 @@ def description(self) -> OperationDescription: """Contains all the operation init parameters.""" return self._description - def check_sanity(self) -> bool: # noqa: B027 + def check_sanity(self) -> None: # TODO: add some checks - pass + return class DocOperation(Operation):