From 39f3adc132adb1895920376e5e76e45a991a6bb5 Mon Sep 17 00:00:00 2001 From: Vladimir Blagojevic Date: Thu, 6 Jun 2024 17:46:56 +0200 Subject: [PATCH] Typing fixes --- haystack_experimental/components/tools/openapi/_openapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haystack_experimental/components/tools/openapi/_openapi.py b/haystack_experimental/components/tools/openapi/_openapi.py index e171c35d..990470cd 100644 --- a/haystack_experimental/components/tools/openapi/_openapi.py +++ b/haystack_experimental/components/tools/openapi/_openapi.py @@ -351,7 +351,7 @@ def __init__( # noqa: PLR0913 pylint: disable=too-many-arguments self.request_sender = request_sender or send_request self.llm_provider: LLMProvider = llm_provider or LLMProvider.OPENAI - def get_auth_function(self) -> Callable[[dict[str, Any], dict[str, Any]], Any]: + def get_auth_function(self) -> Callable[[Dict[str, Any], Dict[str, Any]], Any]: """ Get the authentication function that sets a schema specified authentication to the request. @@ -401,7 +401,7 @@ def get_payload_extractor(self): def _create_authentication_from_string( self, credentials: str, security_schemes: Dict[str, Any] - ) -> Callable[[dict[str, Any], dict[str, Any]], Any]: + ) -> Callable[[Dict[str, Any], Dict[str, Any]], Any]: for scheme in security_schemes.values(): if scheme["type"] == "apiKey": return create_api_key_auth_function(api_key=credentials)