Skip to content

Commit ebc468d

Browse files
declan-scaleclaude
andcommitted
style: ruff import-sort + format fixes across the harness package
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e7b9c52 commit ebc468d

15 files changed

Lines changed: 228 additions & 157 deletions

src/agentex/lib/core/harness/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
harness tap gets streaming + tracing + turn usage uniformly.
66
"""
77

8-
from agentex.lib.core.harness.emitter import UnifiedEmitter
9-
from agentex.lib.core.harness.tracer import SpanTracer
108
from agentex.lib.core.harness.types import (
11-
CloseSpan,
12-
HarnessTurn,
139
OpenSpan,
10+
CloseSpan,
11+
TurnUsage,
1412
SpanSignal,
15-
StreamTaskMessage,
1613
TurnResult,
17-
TurnUsage,
14+
HarnessTurn,
15+
StreamTaskMessage,
1816
)
17+
from agentex.lib.core.harness.tracer import SpanTracer
18+
from agentex.lib.core.harness.emitter import UnifiedEmitter
1919

2020
__all__ = [
2121
"UnifiedEmitter",

src/agentex/lib/core/harness/auto_send.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44

55
from typing import Any, AsyncIterator
66

7+
from agentex.types.text_delta import TextDelta
8+
from agentex.lib.core.harness.types import TurnUsage, TurnResult, StreamTaskMessage
9+
from agentex.lib.core.harness.tracer import SpanTracer
710
from agentex.types.task_message_update import (
8-
StreamTaskMessageDelta,
911
StreamTaskMessageDone,
1012
StreamTaskMessageFull,
13+
StreamTaskMessageDelta,
1114
StreamTaskMessageStart,
1215
)
13-
from agentex.types.text_delta import TextDelta
14-
1516
from agentex.lib.core.harness.span_derivation import SpanDeriver
16-
from agentex.lib.core.harness.tracer import SpanTracer
17-
from agentex.lib.core.harness.types import StreamTaskMessage, TurnResult, TurnUsage
1817

1918

2019
async def auto_send(

src/agentex/lib/core/harness/emitter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
from typing import AsyncGenerator
66

7-
from agentex.lib.core.harness.auto_send import auto_send
7+
from agentex.lib.core.harness.types import TurnResult, HarnessTurn, StreamTaskMessage
88
from agentex.lib.core.harness.tracer import SpanTracer
9-
from agentex.lib.core.harness.types import HarnessTurn, StreamTaskMessage, TurnResult
9+
from agentex.lib.core.harness.auto_send import auto_send
1010
from agentex.lib.core.harness.yield_delivery import yield_events
1111

1212

src/agentex/lib/core/harness/span_derivation.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@
99
import json
1010
from dataclasses import dataclass
1111

12+
from agentex.lib.core.harness.types import OpenSpan, CloseSpan, SpanSignal, StreamTaskMessage
13+
from agentex.types.tool_request_delta import ToolRequestDelta
1214
from agentex.types.task_message_update import (
13-
StreamTaskMessageDelta,
1415
StreamTaskMessageDone,
1516
StreamTaskMessageFull,
17+
StreamTaskMessageDelta,
1618
StreamTaskMessageStart,
1719
)
1820
from agentex.types.tool_request_content import ToolRequestContent
19-
from agentex.types.tool_request_delta import ToolRequestDelta
2021
from agentex.types.tool_response_content import ToolResponseContent
2122

22-
from agentex.lib.core.harness.types import CloseSpan, OpenSpan, SpanSignal, StreamTaskMessage
23-
2423

2524
@dataclass
2625
class _ToolReqMeta:

src/agentex/lib/core/harness/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from typing import Any
66

7-
from agentex.lib.core.harness.types import CloseSpan, OpenSpan, SpanSignal
7+
from agentex.lib.core.harness.types import OpenSpan, CloseSpan, SpanSignal
88

99
try:
1010
from agentex.lib.utils.logging import make_logger

src/agentex/lib/core/harness/types.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
from __future__ import annotations
44

5-
from dataclasses import dataclass, field
6-
from typing import Any, AsyncIterator, Literal, Protocol, Union, runtime_checkable
5+
from typing import Any, Union, Literal, Protocol, AsyncIterator, runtime_checkable
6+
from dataclasses import field, dataclass
7+
8+
from pydantic import BaseModel, ConfigDict
79

810
from agentex.types.task_message_update import (
9-
StreamTaskMessageDelta,
1011
StreamTaskMessageDone,
1112
StreamTaskMessageFull,
13+
StreamTaskMessageDelta,
1214
StreamTaskMessageStart,
1315
)
14-
from pydantic import BaseModel, ConfigDict
1516

1617
# The canonical stream element. Taps yield these; delivery adapters consume them.
1718
StreamTaskMessage = Union[

src/agentex/lib/core/harness/yield_delivery.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
from __future__ import annotations
44

5-
from typing import AsyncGenerator, AsyncIterator
5+
from typing import AsyncIterator, AsyncGenerator
66

7-
from agentex.lib.core.harness.span_derivation import SpanDeriver
8-
from agentex.lib.core.harness.tracer import SpanTracer
97
from agentex.lib.core.harness.types import StreamTaskMessage
8+
from agentex.lib.core.harness.tracer import SpanTracer
9+
from agentex.lib.core.harness.span_derivation import SpanDeriver
1010

1111

1212
async def yield_events(

tests/lib/core/harness/conformance/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
from dataclasses import dataclass
2020

21-
from agentex.lib.core.harness.span_derivation import SpanDeriver
2221
from agentex.lib.core.harness.types import SpanSignal, StreamTaskMessage
22+
from agentex.lib.core.harness.span_derivation import SpanDeriver
2323

2424

2525
@dataclass

tests/lib/core/harness/conformance/test_conformance.py

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,36 @@
11
import pytest
22

3-
from tests.lib.core.harness.conformance.runner import Fixture, derive_all, register, all_fixtures
43
from agentex.types.task_message_update import (
5-
StreamTaskMessageStart, StreamTaskMessageDone, StreamTaskMessageFull,
4+
StreamTaskMessageDone,
5+
StreamTaskMessageFull,
6+
StreamTaskMessageStart,
67
)
78
from agentex.types.tool_request_content import ToolRequestContent
89
from agentex.types.tool_response_content import ToolResponseContent
10+
from tests.lib.core.harness.conformance.runner import Fixture, register, derive_all, all_fixtures
911

10-
register(Fixture(
11-
name="builtin-single-tool",
12-
events=[
13-
StreamTaskMessageStart(type="start", index=0,
14-
content=ToolRequestContent(type="tool_request", author="agent",
15-
tool_call_id="c", name="Bash", arguments={})),
16-
StreamTaskMessageDone(type="done", index=0),
17-
StreamTaskMessageFull(type="full", index=1,
18-
content=ToolResponseContent(type="tool_response", author="agent",
19-
tool_call_id="c", name="Bash", content="ok")),
20-
],
21-
))
12+
register(
13+
Fixture(
14+
name="builtin-single-tool",
15+
events=[
16+
StreamTaskMessageStart(
17+
type="start",
18+
index=0,
19+
content=ToolRequestContent(
20+
type="tool_request", author="agent", tool_call_id="c", name="Bash", arguments={}
21+
),
22+
),
23+
StreamTaskMessageDone(type="done", index=0),
24+
StreamTaskMessageFull(
25+
type="full",
26+
index=1,
27+
content=ToolResponseContent(
28+
type="tool_response", author="agent", tool_call_id="c", name="Bash", content="ok"
29+
),
30+
),
31+
],
32+
)
33+
)
2234

2335

2436
@pytest.mark.parametrize("fixture", all_fixtures(), ids=lambda f: f.name)

0 commit comments

Comments
 (0)