Skip to content

Commit

Permalink
WIP: More type check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ghisvail committed Oct 23, 2024
1 parent 0c7a9b0 commit fef98f3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions medkit/core/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 or generate_id()
self._description = OperationDescription(
uid=self.uid,
class_name=self.__class__.__name__,
name=name,
name=name or self.__class__.__name__,
config=kwargs,
)

Expand All @@ -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):
Expand Down

0 comments on commit fef98f3

Please sign in to comment.