Skip to content

Commit 397de11

Browse files
committed
Python: Fix typing of idle event attribute setup in Copilot tests
1 parent eb24f70 commit 397de11

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎python/packages/github_copilot/tests/test_github_copilot_agent.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,8 @@ async def test_streaming_rejects_aborted_root_idle(
15351535
) -> None:
15361536
"""An aborted idle is an error, not a successful structured result."""
15371537
aborted_idle = create_session_event(SessionEventType.SESSION_IDLE)
1538-
aborted_idle.data.aborted = True # type: ignore[attr-defined]
1538+
aborted_data: Any = aborted_idle.data
1539+
aborted_data.aborted = True
15391540
self._replay(
15401541
mock_session,
15411542
[
@@ -1557,7 +1558,8 @@ async def test_streaming_ignores_autopilot_idle_until_final_response(
15571558
) -> None:
15581559
"""An autopilot idle does not end the stream; the later final root response is used."""
15591560
autopilot_idle = create_session_event(SessionEventType.SESSION_IDLE)
1560-
autopilot_idle.data.mode = "autopilot" # type: ignore[attr-defined]
1561+
autopilot_data: Any = autopilot_idle.data
1562+
autopilot_data.mode = "autopilot"
15611563
self._replay(
15621564
mock_session,
15631565
[

0 commit comments

Comments
 (0)