mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-29 01:48:57 +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:
|
for endpoint_name in endpoint_names:
|
||||||
found_match = False
|
found_match = False
|
||||||
for name, _, docs in api_spec.endpoints:
|
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):
|
if regex_name.match(endpoint_name):
|
||||||
found_match = True
|
found_match = True
|
||||||
docs_str += f"== Docs for {endpoint_name} == \n{yaml.dump(docs)}\n"
|
docs_str += f"== Docs for {endpoint_name} == \n{yaml.dump(docs)}\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user