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
@@ -50,7 +50,7 @@ async def main() -> None:
# Create the AIFunction tool using dependency injection
# The 'definition' dictionary contains the serialized tool configuration,
# while the actual function implementation is provided via dependencies.
#
#
# Dependency structure: {"ai_function": {"name:add_numbers": {"func": func}}}
# - "ai_function": matches the tool type identifier
# - "name:add_numbers": instance-specific injection targeting tools with name="add_numbers"
@@ -45,7 +45,7 @@ async def approval_example() -> None:
# Check for approval requests
if result.user_input_requests:
for request in result.user_input_requests:
print(f"\nApproval needed:")
print("\nApproval needed:")
print(f" Function: {request.function_call.name}")
print(f" Arguments: {request.function_call.arguments}")
@@ -79,12 +79,12 @@ async def rejection_example() -> None:
if result.user_input_requests:
for request in result.user_input_requests:
print(f"\nApproval needed:")
print("\nApproval needed:")
print(f" Function: {request.function_call.name}")
print(f" Arguments: {request.function_call.arguments}")
# User rejects
print(f" Decision: Rejected")
print(" Decision: Rejected")
# Send rejection response
rejection_response = request.create_response(approved=False)