Skip to content

Commit 6674c02

Browse files
committed
fix: adjust realtime handoff import
1 parent 095496e commit 6674c02

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/agents/realtime/handoffs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
from ..tracing.spans import SpanError
1414
from ..util import _error_tracing, _json
1515
from ..util._types import MaybeAwaitable
16+
from . import RealtimeAgent
1617

1718
if TYPE_CHECKING:
1819
from ..agent import AgentBase
19-
from . import RealtimeAgent
2020

2121

2222
# The handoff input type is the type of data passed when the agent is called via a handoff.

tests/realtime/test_realtime_handoffs.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,6 @@ async def is_enabled(ctx, agent):
139139

140140
h = realtime_handoff(rt, is_enabled=is_enabled)
141141

142-
# Patch missing symbol in module to satisfy isinstance in closure
143-
import agents.realtime.handoffs as rh
144-
145-
if not hasattr(rh, "RealtimeAgent"):
146-
from agents.realtime import RealtimeAgent as _RT
147-
148-
rh.RealtimeAgent = _RT # type: ignore[attr-defined]
149-
150142
from collections.abc import Awaitable
151143
from typing import cast as _cast
152144

0 commit comments

Comments
 (0)