Skip to content

Commit 09becf0

Browse files
committed
fix old_version_tests
1 parent 967a06a commit 09becf0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/agents/extensions/memory/advanced_sqlite_session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import threading
77
from contextlib import closing
88
from pathlib import Path
9-
from typing import Any, cast
9+
from typing import Any, Union, cast
1010

1111
from agents.result import RunResult
1212
from agents.usage import Usage
@@ -480,7 +480,7 @@ def _get_usage_sync():
480480

481481
result = await asyncio.to_thread(_get_usage_sync)
482482

483-
return cast(dict[str, int] | None, result)
483+
return cast(Union[dict[str, int], None], result)
484484

485485
async def get_conversation_by_turns(
486486
self, include_inactive: bool = False
@@ -665,4 +665,4 @@ def _get_turn_usage_sync():
665665

666666
result = await asyncio.to_thread(_get_turn_usage_sync)
667667

668-
return cast(list[dict[str, Any]] | dict[str, Any], result)
668+
return cast(Union[list[dict[str, Any]], dict[str, Any]], result)

0 commit comments

Comments
 (0)