From 3fa5ce3e5f6f524b3e4709d1197e4bf72a1ca323 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Tue, 15 Oct 2024 08:43:53 -0700 Subject: [PATCH] community: clear mypy syntax warning in openapi (#27370) not completely clear the regex is functional --- .../langchain_community/agent_toolkits/openapi/planner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/agent_toolkits/openapi/planner.py b/libs/community/langchain_community/agent_toolkits/openapi/planner.py index fbd3fc36b43aa..eb2c0efe4c606 100644 --- a/libs/community/langchain_community/agent_toolkits/openapi/planner.py +++ b/libs/community/langchain_community/agent_toolkits/openapi/planner.py @@ -356,7 +356,7 @@ def _create_and_run_api_controller_agent(plan_str: str) -> str: for endpoint_name in endpoint_names: found_match = False for name, _, docs in api_spec.endpoints: - regex_name = re.compile(re.sub("\{.*?\}", ".*", name)) + regex_name = re.compile(re.sub("\\{.*?\\}", ".*", name)) if regex_name.match(endpoint_name): found_match = True docs_str += f"== Docs for {endpoint_name} == \n{yaml.dump(docs)}\n"