community: clear mypy syntax warning in openapi (#27370)

not completely clear the regex is functional
This commit is contained in:
Erick Friis 2024-10-15 08:43:53 -07:00 committed by GitHub
parent 443b37403d
commit 3fa5ce3e5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"