mirror of
https://github.com/hwchase17/langchain
synced 2024-11-13 19:10:52 +00:00
community: clear mypy syntax warning in openapi (#27370)
not completely clear the regex is functional
This commit is contained in:
parent
443b37403d
commit
3fa5ce3e5f
@ -356,7 +356,7 @@ def _create_api_controller_tool(
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user