Python: Clean up imports (#2318)

* chore: tidy imports

* Update python/packages/azurefunctions/agent_framework_azurefunctions/_errors.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/azurefunctions/agent_framework_azurefunctions/_callbacks.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: revert stub file change

* chore: trigger pre-commit hook, re-add `annotations` import

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Brandon McConnell
2025-11-19 18:41:01 -05:00
committed by GitHub
Unverified
parent b3e96b80ae
commit 79bb87061b
45 changed files with 191 additions and 228 deletions
@@ -10,6 +10,8 @@ from typing import Any
from agent_framework.azure import AgentFunctionApp, AzureOpenAIChatClient
from azure.identity import AzureCliCredential
# 1. Instantiate the agent with the chosen deployment and instructions.
def _create_agent() -> Any:
"""Create the Joker agent."""
@@ -40,6 +40,7 @@ class EmailPayload(BaseModel):
email_id: str
email_content: str
# 2. Instantiate both agents so they can be registered with AgentFunctionApp.
def _create_agents() -> list[Any]:
chat_client = AzureOpenAIChatClient(credential=AzureCliCredential())
@@ -275,7 +275,7 @@ async def get_orchestration_status(
show_history_output=False,
show_input=True,
)
# Check if status is None or if the instance doesn't exist (runtime_status is None)
if status is None or getattr(status, "runtime_status", None) is None:
return func.HttpResponse(