File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
services/director/src/simcore_service_director Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 55from collections .abc import Mapping
66from http import HTTPStatus
77from pprint import pformat
8- from typing import Any , Final
8+ from typing import Any , Final , cast
99
10- from aiocache import Cache , SimpleMemoryCache
10+ from aiocache import Cache , SimpleMemoryCache # type: ignore[import-untyped]
1111from aiohttp import BasicAuth , ClientSession , client_exceptions
1212from aiohttp .client import ClientTimeout
1313from fastapi import FastAPI
@@ -205,7 +205,8 @@ async def registry_request(
205205 cache : SimpleMemoryCache = app .state .registry_cache_memory
206206 cache_key = f"{ method } _{ path } "
207207 if not no_cache and (cached_response := await cache .get (cache_key )):
208- return cached_response
208+ assert isinstance (tuple [dict , Mapping ], cached_response ) # nosec
209+ return cast (tuple [dict , Mapping ], cached_response )
209210
210211 app_settings = get_application_settings (app )
211212 response , response_headers = await _basic_auth_registry_request (
You can’t perform that action at this time.
0 commit comments