File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 66import sys
77from contextlib import asynccontextmanager
88from pathlib import Path
9- from typing import AsyncContextManager # noqa: UP035
9+ from typing import AsyncContextManager , Literal # noqa: UP035
1010from urllib .parse import urlparse
1111
1212import 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 (
You can’t perform that action at this time.
0 commit comments