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

Commit 9823721

Browse files
committed
fix: refs to loader
1 parent 179b178 commit 9823721

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

hatchet_sdk/client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ def from_environment(
3737
loop = asyncio.new_event_loop()
3838
asyncio.set_event_loop(loop)
3939

40-
config: ClientConfig = ConfigLoader(".").load_client_config(defaults)
4140
for opt_function in opts_functions:
42-
opt_function(config)
41+
opt_function(defaults)
4342

44-
return cls.from_config(config, debug)
43+
return cls.from_config(defaults, debug)
4544

4645
@classmethod
4746
def from_config(

hatchet_sdk/hatchet.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from hatchet_sdk.features.cron import CronClient
1717
from hatchet_sdk.features.scheduled import ScheduledClient
1818
from hatchet_sdk.labels import DesiredWorkerLabel
19-
from hatchet_sdk.loader import ClientConfig, ConfigLoader
19+
from hatchet_sdk.loader import ClientConfig
2020
from hatchet_sdk.rate_limit import RateLimit
2121
from hatchet_sdk.v2.callable import HatchetCallable
2222

@@ -187,12 +187,8 @@ class HatchetRest:
187187
rest (RestApi): Interface for REST API operations.
188188
"""
189189

190-
rest: RestApi
191-
192190
def __init__(self, config: ClientConfig = ClientConfig()):
193-
_config: ClientConfig = ConfigLoader(".").load_client_config(config)
194-
self.rest = RestApi(_config.server_url, _config.token, _config.tenant_id)
195-
191+
self.rest = RestApi(config.server_url, config.token, config.tenant_id)
196192

197193
class Hatchet:
198194
"""

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ files = [
9393
"hatchet_sdk/clients/rest/models/workflow_run.py",
9494
"hatchet_sdk/context/worker_context.py",
9595
"hatchet_sdk/clients/dispatcher/dispatcher.py",
96+
"hatchet_sdk/loader.py",
9697
]
9798
follow_imports = "silent"
9899
disable_error_code = ["unused-coroutine"]

0 commit comments

Comments
 (0)