From 4ce00d8c9266df533f6041dd0dcd849a9f568767 Mon Sep 17 00:00:00 2001 From: Rachit Mehta Date: Tue, 2 Dec 2025 12:33:04 -0500 Subject: [PATCH] fix minor linting and integ test failure errors --- pyproject.toml | 2 +- src/strands/types/_events.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2a8b250fe..f5738a68b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -235,7 +235,7 @@ convention = "google" [tool.pytest.ini_options] testpaths = ["tests"] asyncio_default_fixture_loop_scope = "function" -addopts = "--ignore=tests/strands/experimental/bidi" +addopts = "--ignore=tests/strands/experimental/bidi --ignore=tests_integ/bidi" [tool.coverage.run] diff --git a/src/strands/types/_events.py b/src/strands/types/_events.py index 1337237ba..efe0894ea 100644 --- a/src/strands/types/_events.py +++ b/src/strands/types/_events.py @@ -286,7 +286,7 @@ def __init__(self, tool_result: ToolResult) -> None: @property def tool_use_id(self) -> str: """The toolUseId associated with this result.""" - return cast(str, cast(ToolResult, self.get("tool_result")).get("toolUseId")) + return cast(ToolResult, self.get("tool_result")).get("toolUseId") @property def tool_result(self) -> ToolResult: @@ -314,7 +314,7 @@ def __init__(self, tool_use: ToolUse, tool_stream_data: Any) -> None: @property def tool_use_id(self) -> str: """The toolUseId associated with this stream.""" - return cast(str, cast(ToolUse, cast(dict, self.get("tool_stream_event")).get("tool_use")).get("toolUseId")) + return cast(ToolUse, cast(dict, self.get("tool_stream_event")).get("tool_use")).get("toolUseId") class ToolCancelEvent(TypedEvent): @@ -332,7 +332,7 @@ def __init__(self, tool_use: ToolUse, message: str) -> None: @property def tool_use_id(self) -> str: """The id of the tool cancelled.""" - return cast(str, cast(ToolUse, cast(dict, self.get("tool_cancel_event")).get("tool_use")).get("toolUseId")) + return cast(ToolUse, cast(dict, self.get("tool_cancel_event")).get("tool_use")).get("toolUseId") @property def message(self) -> str: @@ -350,7 +350,7 @@ def __init__(self, tool_use: ToolUse, interrupts: list[Interrupt]) -> None: @property def tool_use_id(self) -> str: """The id of the tool interrupted.""" - return cast(str, cast(ToolUse, cast(dict, self.get("tool_interrupt_event")).get("tool_use")).get("toolUseId")) + return cast(ToolUse, cast(dict, self.get("tool_interrupt_event")).get("tool_use")).get("toolUseId") @property def interrupts(self) -> list[Interrupt]: