Skip to content

Commit 4e2c0fe

Browse files
committed
style: add annotations and return types to test
1 parent 6dcf9ae commit 4e2c0fe

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

core/tests/test_tool_context_propagation.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
Fix: wrap the executor call in contextvars.copy_context().run().
1010
"""
1111

12+
from __future__ import annotations
13+
1214
import pytest
1315

1416
from framework.graph.event_loop.tool_result_handler import execute_tool
@@ -19,14 +21,14 @@
1921
class _ToolCallEvent:
2022
"""Minimal stand-in for ToolCallEvent used by execute_tool."""
2123

22-
def __init__(self, tool_name: str, tool_input: dict):
24+
def __init__(self, tool_name: str, tool_input: dict) -> None:
2325
self.tool_use_id = "test_id"
2426
self.tool_name = tool_name
2527
self.tool_input = tool_input
2628

2729

2830
@pytest.mark.asyncio
29-
async def test_execution_context_propagates_to_tool_executor():
31+
async def test_execution_context_propagates_to_tool_executor() -> None:
3032
"""data_dir set via set_execution_context must be visible inside
3133
the tool executor even though it runs in a thread pool."""
3234

@@ -62,7 +64,7 @@ def capturing_executor(tool_use: ToolUse) -> ToolResult:
6264

6365

6466
@pytest.mark.asyncio
65-
async def test_execution_context_none_when_not_set():
67+
async def test_execution_context_none_when_not_set() -> None:
6668
"""When no execution context is set, executor should still work
6769
(context is None, not an error)."""
6870

0 commit comments

Comments
 (0)