Skip to content

Python: Fix redundant type cast in Agent._handle_tool_calls - #10315

Open
Dhruv Shaswat (Dhruv-Sh-git) wants to merge 1 commit into
microsoft:mainfrom
Dhruv-Sh-git:fix/mypy-cast
Open

Dhruv Shaswat (Dhruv-Sh-git) wants to merge 1 commit into
microsoft:mainfrom
Dhruv-Sh-git:fix/mypy-cast

Conversation

@Dhruv-Sh-git

Copy link
Copy Markdown
Contributor

Motivation & Context

A redundant cast in Agent._handle_tool_calls triggers a mypy warning during CI. This change removes the unnecessary cast and keeps the code cleaner.

Description & Changes

  • Removed the redundant cast(ToolCall, ...) from Agent._handle_tool_calls.
  • Added a regression test to cover the affected behavior.

Related Issue

Fixes #8828

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Nov 12, 2026

This branch was successfully deployed

1 active deployment
github-app-auth — e7a479fa Deployed Nov 12, 2026 by Dhruv-Sh-git via team_check #9393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: AGUIChatClient replaces the server's RUN_ERROR code with a generic "RUN_ERROR"

2 participants