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

Commit ebc4f8a

Browse files
committed
fix: remove some unused stuff
1 parent d556b81 commit ebc4f8a

File tree

2 files changed

+6
-41
lines changed

2 files changed

+6
-41
lines changed

hatchet_sdk/v2/hatchet.py

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,12 @@
11
import asyncio
22
import logging
3-
from enum import Enum
4-
from typing import (
5-
TYPE_CHECKING,
6-
Any,
7-
Callable,
8-
Generic,
9-
Optional,
10-
ParamSpec,
11-
Type,
12-
TypeVar,
13-
Union,
14-
)
15-
16-
from pydantic import BaseModel, ConfigDict
3+
from typing import TYPE_CHECKING, Any, Callable, Optional, TypeVar
4+
175
from typing_extensions import deprecated
186

197
from hatchet_sdk.clients.rest_client import RestApi
208
from hatchet_sdk.context.context import Context
21-
from hatchet_sdk.contracts.workflows_pb2 import (
22-
ConcurrencyLimitStrategy,
23-
CreateStepRateLimit,
24-
CreateWorkflowJobOpts,
25-
CreateWorkflowStepOpts,
26-
CreateWorkflowVersionOpts,
27-
DesiredWorkerLabels,
28-
StickyStrategy,
29-
WorkflowConcurrencyOpts,
30-
WorkflowKind,
31-
)
9+
from hatchet_sdk.contracts.workflows_pb2 import DesiredWorkerLabels
3210
from hatchet_sdk.features.cron import CronClient
3311
from hatchet_sdk.features.scheduled import ScheduledClient
3412
from hatchet_sdk.labels import DesiredWorkerLabel
@@ -48,21 +26,6 @@
4826
R = TypeVar("R")
4927

5028

51-
class HatchetRest:
52-
"""
53-
Main client for interacting with the Hatchet API.
54-
55-
This class provides access to various client interfaces and utility methods
56-
for working with Hatchet via the REST API,
57-
58-
Attributes:
59-
rest (RestApi): Interface for REST API operations.
60-
"""
61-
62-
def __init__(self, config: ClientConfig = ClientConfig()):
63-
self.rest = RestApi(config.server_url, config.token, config.tenant_id)
64-
65-
6629
def transform_desired_worker_label(d: DesiredWorkerLabel) -> DesiredWorkerLabels:
6730
value = d.value
6831
return DesiredWorkerLabels(

hatchet_sdk/worker/runner/runner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ def inner_callback(task: asyncio.Task[Any]) -> None:
225225
return inner_callback
226226

227227
## TODO: Stricter type hinting here
228-
def thread_action_func(self, context: Context, step: "Step[T]", action: Action) -> T:
228+
def thread_action_func(
229+
self, context: Context, step: "Step[T]", action: Action
230+
) -> T:
229231
if action.step_run_id is not None and action.step_run_id != "":
230232
self.threads[action.step_run_id] = current_thread()
231233
elif (

0 commit comments

Comments
 (0)