MCPcopy Create free account
hub / github.com/Snapchat/Valdi / update

Function update

tools/api_surface/check_api_surface.py:253–265  ·  view source on GitHub ↗

Regenerate the baseline file.

(open_source_root: Path)

Source from the content-addressed store, hash-verified

251
252
253def update(open_source_root: Path):
254 """Regenerate the baseline file."""
255 current = extract_api(open_source_root)
256 BASELINE_PATH.write_text(json.dumps(current, indent=2, sort_keys=True) + "\n")
257 iface_count = len(current.get("interfaces", {}))
258 type_count = len(current.get("types", {}))
259 enum_count = len(current.get("enums", {}))
260 class_count = len(current.get("classes", {}))
261 print(
262 f"{GREEN}Baseline updated: "
263 f"{iface_count} interfaces, {type_count} types, "
264 f"{enum_count} enums, {class_count} classes{RESET}"
265 )
266
267
268def main():

Callers 10

mainFunction · 0.85
addStyleFunction · 0.85
TEST_FFunction · 0.85
updateMethod · 0.85
drawMethod · 0.85
drawMethod · 0.85
runMethod · 0.85
cancelMethod · 0.85
completeMethod · 0.85
runMethod · 0.85

Calls 3

extract_apiFunction · 0.90
printFunction · 0.85
getMethod · 0.65

Tested by 1

TEST_FFunction · 0.68