Skip to content

Commit 121ebf4

Browse files
committed
fix: minor type annotation
1 parent 6b8996d commit 121ebf4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mcp_scan/mcp_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77
from contextlib import asynccontextmanager
88
from pathlib import Path
9-
from typing import AsyncContextManager # noqa: UP035
9+
from typing import AsyncContextManager, Literal # noqa: UP035
1010
from urllib.parse import urlparse
1111

1212
import pyjson5
@@ -181,7 +181,7 @@ async def check_server(
181181
return result
182182
else:
183183
logger.debug(f"Remote server with url: {server_config.url}, type: {server_config.type or 'none'}")
184-
strategy = []
184+
strategy: list[tuple[Literal["sse", "http"], str]] = []
185185
url_path = urlparse(server_config.url).path
186186
has_sse_in_url = url_path.endswith("/sse")
187187
if has_sse_in_url:
@@ -205,7 +205,7 @@ async def check_server(
205205
exceptions: list[Exception] = []
206206
for protocol, url in strategy:
207207
try:
208-
server_config.type = protocol # type: ignore
208+
server_config.type = protocol
209209
server_config.url = url
210210
logger.debug(f"Trying {protocol} with url: {url}")
211211
result = await asyncio.wait_for(

0 commit comments

Comments
 (0)