Skip to content

Commit d087dc0

Browse files
committed
improve typing
1 parent 50cec66 commit d087dc0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/agentex/lib/core/clients/temporal/temporal_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from temporalio.client import Client, WorkflowExecutionStatus
88
from temporalio.common import RetryPolicy as TemporalRetryPolicy, WorkflowIDReusePolicy
99
from temporalio.service import RPCError, RPCStatusCode
10+
from temporalio.converter import PayloadCodec
1011

1112
from agentex.lib.utils.logging import make_logger
1213
from agentex.lib.utils.model_utils import BaseModel
@@ -76,7 +77,7 @@
7677

7778

7879
class TemporalClient:
79-
def __init__(self, temporal_client: Client | None = None, plugins: list[Any] = [], payload_codec: Any | None = None):
80+
def __init__(self, temporal_client: Client | None = None, plugins: list[Any] = [], payload_codec: PayloadCodec | None = None):
8081
self._client: Client | None = temporal_client
8182
self._plugins = plugins
8283
self._payload_codec = payload_codec
@@ -89,7 +90,7 @@ def client(self) -> Client:
8990
return self._client
9091

9192
@classmethod
92-
async def create(cls, temporal_address: str, plugins: list[Any] = [], payload_codec: Any | None = None):
93+
async def create(cls, temporal_address: str, plugins: list[Any] = [], payload_codec: PayloadCodec | None = None):
9394
if temporal_address in [
9495
"false",
9596
"False",

0 commit comments

Comments
 (0)