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 Sep 17, 2024
1 parent 079a6e9 commit ad0bd95
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 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 | generate_id()
self._description = OperationDescription(
uid=self.uid,
class_name=self.__class__.__name__,
name=name,
name=name | self.__class__.__name__,
config=kwargs,
)

Expand All @@ -68,9 +61,10 @@ def description(self) -> OperationDescription:
"""Contains all the operation init parameters."""
return self._description

def check_sanity(self) -> bool: # noqa: B027
@abc.abstractmethod
def check_sanity(self) -> bool:
# TODO: add some checks
pass
...


class DocOperation(Operation):
Expand Down

0 comments on commit ad0bd95

Please sign in to comment.