Skip to content

Commit ba7ba50

Browse files
committed
fix mypy and pylint
1 parent 76f935b commit ba7ba50

File tree

2 files changed

+9
-10
lines changed
  • sdk/agentserver
    • azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework
    • azure-ai-agentserver-core/azure/ai/agentserver/core/server

2 files changed

+9
-10
lines changed

sdk/agentserver/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/tool_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(self, tool_client: "AzureAIToolClient") -> None:
5757
:type tool_client: ~azure.ai.agentserver.core.client.tools.aio.AzureAIToolClient
5858
"""
5959
self._tool_client = tool_client
60-
self._aifunction_cache: List[AIFunction] = None
60+
self._aifunction_cache: List[AIFunction] = None # mypy: ignore[assignment]
6161

6262
async def list_tools(self) -> List[AIFunction]:
6363
"""List all available tools as Agent Framework tool definitions.

sdk/agentserver/azure-ai-agentserver-core/azure/ai/agentserver/core/server/base.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# ---------------------------------------------------------
44
# pylint: disable=broad-exception-caught,unused-argument,logging-fstring-interpolation,too-many-statements,too-many-return-statements
5-
# mypy: disable-error-code="name-defined,annotation-unchecked,arg-type"
5+
# mypy: ignore-errors
66
import inspect
77
import json
88
import os
@@ -341,7 +341,7 @@ def get_tool_client(
341341
logger.debug("Creating AzureAIToolClient with tools: %s", tools)
342342
if not self.credentials:
343343
raise ValueError("Credentials are required to create Tool Client.")
344-
344+
345345
workspace_endpoint = os.getenv(Constants.AZURE_AI_WORKSPACE_ENDPOINT)
346346
if workspace_endpoint:
347347
agent_name = os.getenv(Constants.AGENT_NAME)
@@ -354,13 +354,12 @@ def get_tool_client(
354354
user=user_info,
355355
agent_name=agent_name,
356356
)
357-
else:
358-
return AzureAIToolClient(
359-
endpoint=os.getenv(Constants.AZURE_AI_PROJECT_ENDPOINT),
360-
credential=self.credentials,
361-
tools=tools,
362-
user=user_info,
363-
)
357+
return AzureAIToolClient(
358+
endpoint=os.getenv(Constants.AZURE_AI_PROJECT_ENDPOINT),
359+
credential=self.credentials,
360+
tools=tools,
361+
user=user_info,
362+
)
364363

365364

366365
def _event_to_sse_chunk(event: ResponseStreamEvent) -> str:

0 commit comments

Comments
 (0)