Skip to content

Commit 0b870b8

Browse files
committed
fix: rename response_outputs to avoid name collision with case-block variable
Fixes #6235 Rename outputs to response_outputs on line 1974 to avoid mypy error about conflicting variable names in the match statement's case blocks. Also use list[Any] for explicit generic type annotation.
1 parent e631d30 commit 0b870b8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎python/packages/openai/agent_framework_openai/_chat_client.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,8 +1971,8 @@ def _parse_response_from_openai(
19711971
metadata: dict[str, Any] = response.metadata or {}
19721972
contents: list[Content] = []
19731973
local_shell_tool_name = self._get_local_shell_tool_name(options.get("tools"))
1974-
outputs: list = getattr(response, "output", None) or []
1975-
for item in outputs:
1974+
response_outputs: list[Any] = getattr(response, "output", None) or []
1975+
for item in response_outputs:
19761976
match item.type:
19771977
# types:
19781978
# ParsedResponseOutputMessage[Unknown] |

0 commit comments

Comments
 (0)