Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 793becd

Browse files
committed
fix: get rid of impl
1 parent b579ee6 commit 793becd

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

examples/simple/worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
from dotenv import load_dotenv
22

33
from hatchet_sdk import Context
4-
from hatchet_sdk.v2 import BaseWorkflowImpl, Hatchet
4+
from hatchet_sdk.v2 import BaseWorkflow, Hatchet
55

66
load_dotenv()
77

88
hatchet = Hatchet(debug=True)
99

1010

11-
class MyWorkflow(BaseWorkflowImpl):
11+
class MyWorkflow(BaseWorkflow):
1212
@hatchet.step(timeout="11s", retries=3)
1313
def step1(self, context: Context) -> dict[str, str]:
1414
print("executed step1")

examples/v2/worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from examples.v2.workflows import example_workflow, hatchet
22
from hatchet_sdk import Context
3-
from hatchet_sdk.v2 import BaseWorkflowImpl
3+
from hatchet_sdk.v2 import BaseWorkflow
44

55

6-
class ExampleV2Workflow(BaseWorkflowImpl):
6+
class ExampleV2Workflow(BaseWorkflow):
77
config = example_workflow.config
88

99
@hatchet.step(timeout="11s", retries=3)

hatchet_sdk/v2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .hatchet import Hatchet as Hatchet
2-
from .workflows import BaseWorkflowImpl as BaseWorkflowImpl
2+
from .workflows import BaseWorkflow as BaseWorkflow
33
from .workflows import WorkflowConfig as WorkflowConfig

hatchet_sdk/v2/workflows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def __init__(
146146
class RegisteredStep(Step[R]):
147147
def __init__(
148148
self,
149-
workflow: "BaseWorkflowImpl",
149+
workflow: "BaseWorkflow",
150150
step: Step[R],
151151
) -> None:
152152
self.workflow = workflow
@@ -193,7 +193,7 @@ def workflow_input(self, ctx: Context) -> TWorkflowInput:
193193
return cast(TWorkflowInput, ctx.workflow_input())
194194

195195

196-
class BaseWorkflowImpl:
196+
class BaseWorkflow:
197197
"""
198198
A Hatchet workflow implementation base. This class should be inherited by all workflow implementations.
199199

hatchet_sdk/worker/worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
)
3737

3838
if TYPE_CHECKING:
39-
from hatchet_sdk.v2 import BaseWorkflowImpl
39+
from hatchet_sdk.v2 import BaseWorkflow
4040

4141
T = TypeVar("T")
4242

@@ -110,7 +110,7 @@ def register_workflow_from_opts(
110110
logger.error(e)
111111
sys.exit(1)
112112

113-
def register_workflow(self, workflow: Union["BaseWorkflowImpl", Any]) -> None:
113+
def register_workflow(self, workflow: Union["BaseWorkflow", Any]) -> None:
114114
namespace = self.client.config.namespace
115115

116116
try:

0 commit comments

Comments
 (0)