Skip to content

Commit d751121

Browse files
committed
autoformat
1 parent c31b23a commit d751121

6 files changed

Lines changed: 28 additions & 16 deletions

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@
7777

7878

7979
class TemporalClient:
80-
def __init__(self, temporal_client: Client | None = None, plugins: list[Any] = [], payload_codec: PayloadCodec | None = None):
80+
def __init__(
81+
self, temporal_client: Client | None = None, plugins: list[Any] = [], payload_codec: PayloadCodec | None = None
82+
):
8183
self._client: Client | None = temporal_client
8284
self._plugins = plugins
8385
self._payload_codec = payload_codec

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
from __future__ import annotations
22

3-
from typing import Any
4-
53
import dataclasses
4+
from typing import Any
65

76
from temporalio.client import Client, Plugin as ClientPlugin
8-
from temporalio.converter import PayloadCodec
97
from temporalio.worker import Interceptor
108
from temporalio.runtime import Runtime, TelemetryConfig, OpenTelemetryConfig
9+
from temporalio.converter import PayloadCodec
1110
from temporalio.contrib.pydantic import pydantic_data_converter
1211

1312
# class DateTimeJSONEncoder(AdvancedJSONEncoder):
@@ -107,9 +106,8 @@ async def get_temporal_client(
107106
# Check if OpenAI plugin is present - it needs to configure its own data converter
108107
# Lazy import to avoid pulling in opentelemetry.sdk for non-Temporal agents
109108
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
110-
has_openai_plugin = any(
111-
isinstance(p, OpenAIAgentsPlugin) for p in (plugins or [])
112-
)
109+
110+
has_openai_plugin = any(isinstance(p, OpenAIAgentsPlugin) for p in (plugins or []))
113111

114112
# Only set data_converter if OpenAI plugin is not present
115113
connect_kwargs = {

src/agentex/lib/core/temporal/workers/worker.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
)
1919
from temporalio.runtime import Runtime, TelemetryConfig, OpenTelemetryConfig
2020
from temporalio.converter import (
21-
DataConverter,
2221
PayloadCodec,
22+
DataConverter,
2323
JSONTypeConverter,
2424
AdvancedJSONEncoder,
2525
DefaultPayloadConverter,
@@ -102,9 +102,8 @@ async def get_temporal_client(
102102
# Check if OpenAI plugin is present - it needs to configure its own data converter
103103
# Lazy import to avoid pulling in opentelemetry.sdk for non-Temporal agents
104104
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
105-
has_openai_plugin = any(
106-
isinstance(p, OpenAIAgentsPlugin) for p in (plugins or [])
107-
)
105+
106+
has_openai_plugin = any(isinstance(p, OpenAIAgentsPlugin) for p in (plugins or []))
108107

109108
# Build connection kwargs
110109
connect_kwargs = {
@@ -146,7 +145,9 @@ def __init__(
146145
self.max_concurrent_activities = max_concurrent_activities
147146
self.health_check_server_running = False
148147
self.healthy = False
149-
self.health_check_port = health_check_port if health_check_port is not None else EnvironmentVariables.refresh().HEALTH_CHECK_PORT
148+
self.health_check_port = (
149+
health_check_port if health_check_port is not None else EnvironmentVariables.refresh().HEALTH_CHECK_PORT
150+
)
150151
self.plugins = plugins
151152
self.interceptors = interceptors
152153
self.metrics_url = metrics_url

src/agentex/lib/sdk/fastacp/fastacp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class FastACP:
3434
Supports three main ACP types:
3535
- "sync": Simple synchronous ACP implementation
3636
- "async": Advanced ACP with sub-types "base" or "temporal" (requires config)
37-
- "agentic": (Deprecated, use "async") Identical to "async"
37+
- "agentic": (Deprecated, use "async") Identical to "async"
3838
"""
3939

4040
@staticmethod

src/agentex/lib/sdk/fastacp/impl/temporal_acp.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,19 @@ def __init__(
4343

4444
@classmethod
4545
@override
46-
def create(cls, temporal_address: str, plugins: list[Any] | None = None, interceptors: list[Any] | None = None, payload_codec: PayloadCodec | None = None) -> "TemporalACP":
46+
def create(
47+
cls,
48+
temporal_address: str,
49+
plugins: list[Any] | None = None,
50+
interceptors: list[Any] | None = None,
51+
payload_codec: PayloadCodec | None = None,
52+
) -> "TemporalACP":
4753
logger.info("Initializing TemporalACP instance")
4854

4955
# Create instance without temporal client initially
50-
temporal_acp = cls(temporal_address=temporal_address, plugins=plugins, interceptors=interceptors, payload_codec=payload_codec)
56+
temporal_acp = cls(
57+
temporal_address=temporal_address, plugins=plugins, interceptors=interceptors, payload_codec=payload_codec
58+
)
5159
temporal_acp._setup_handlers()
5260
logger.info("TemporalACP instance initialized now")
5361
return temporal_acp

src/agentex/lib/types/fastacp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ class AsyncACPConfig(BaseACPConfig):
3939

4040
type: Literal["temporal", "base"] = Field(..., frozen=True)
4141

42+
4243
AgenticACPConfig = AsyncACPConfig
4344

45+
4446
class TemporalACPConfig(AsyncACPConfig):
4547
"""
4648
Configuration for TemporalACP implementation
@@ -87,4 +89,5 @@ class AsyncBaseACPConfig(AsyncACPConfig):
8789

8890
type: Literal["base"] = Field(default="base", frozen=True)
8991

90-
AgenticBaseACPConfig = AsyncBaseACPConfig
92+
93+
AgenticBaseACPConfig = AsyncBaseACPConfig

0 commit comments

Comments
 (0)