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

Commit 6d065ac

Browse files
committed
fix: cleanup
1 parent 9da49fd commit 6d065ac

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

hatchet_sdk/v2/hatchet.py

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

205
from hatchet_sdk.client import Client, new_client, new_client_raw
216
from hatchet_sdk.clients.admin import AdminClient
@@ -41,7 +26,9 @@
4126
WorkflowConfig,
4227
WorkflowDeclaration,
4328
)
44-
from hatchet_sdk.worker.worker import Worker
29+
30+
if TYPE_CHECKING:
31+
from hatchet_sdk.worker.worker import Worker
4532

4633
R = TypeVar("R")
4734

@@ -203,6 +190,8 @@ def inner(func: Callable[[Any, Context], R]) -> Step[R]:
203190
def worker(
204191
self, name: str, max_runs: int | None = None, labels: dict[str, str | int] = {}
205192
) -> "Worker":
193+
from hatchet_sdk.worker.worker import Worker
194+
206195
try:
207196
loop = asyncio.get_running_loop()
208197
except RuntimeError:

0 commit comments

Comments
 (0)