INNER CODE UNIT · Python
body
toyota-connected/ivi-homescreen · scripts/gen_config_reference.py:254
body = text[brace + 1:]
close = re.search(r"^\}", body, re.M)
return body[: close.start()] if close is not None else body
sys.exit(
f"error: {name} definition not found in {path}; "
f"update the scraper in {Path(__file__).name}"
)
def extract_osgi():
# [osgi] / [[osgi.bundles]]. Two read styles, and the at_path().is_*()
# scraper above sees neither reliably: 'priority' is read as
# `const auto node = tbl.at_path("priority"); node.is_string()`, so the
# predicate is not adjacent to the call, and the bounded ints go through
# ReadBoundedInt() with no is_*() at all. Matching only the adjacent form
# would document half the table and quietly miss the rest, which is worse
# than not scraping it: the whole point is that a new key cannot ship
# undocumented.