Skip to content

Commit 38206e1

Browse files
Copilotpontemonti
andcommitted
Remove TYPE_CHECKING and always import TurnContext, add microsoft-agents-hosting-core dependency
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
1 parent 4660d6c commit 38206e1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

libraries/microsoft-agents-a365-tooling/microsoft_agents_a365/tooling/services/mcp_tool_server_configuration_service.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@
2424
import os
2525
import sys
2626
from pathlib import Path
27-
from typing import Any, Dict, List, Optional, TYPE_CHECKING
27+
from typing import Any, Dict, List, Optional
2828

2929
# Third-party imports
3030
import aiohttp
31-
32-
if TYPE_CHECKING:
33-
from microsoft_agents.hosting.core import TurnContext
31+
from microsoft_agents.hosting.core import TurnContext
3432

3533
# Local imports
3634
from ..models import ChatHistoryMessage, MCPServerConfig, ToolOptions
@@ -504,7 +502,7 @@ def _validate_server_strings(self, name: Optional[str], unique_name: Optional[st
504502

505503
async def send_chat_history(
506504
self,
507-
turn_context: "TurnContext",
505+
turn_context: TurnContext,
508506
chat_history_messages: List[ChatHistoryMessage],
509507
options: Optional[ToolOptions] = None,
510508
):

libraries/microsoft-agents-a365-tooling/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ license = {text = "MIT"}
2525
dependencies = [
2626
"pydantic >= 2.0.0",
2727
"typing-extensions >= 4.0.0",
28+
"microsoft-agents-hosting-core >= 0.4.0, < 0.6.0",
2829
]
2930

3031
[project.urls]

0 commit comments

Comments
 (0)