MCPcopy Index your code
hub / github.com/python/cpython / do_check

Function do_check

Doc/tools/check-html-ids.py:75–98  ·  view source on GitHub ↗
(baseline, checked, excluded, *, verbose_print)

Source from the content-addressed store, hash-verified

73
74
75def do_check(baseline, checked, excluded, *, verbose_print):
76 successful = True
77 for name, baseline_ids in sorted(baseline.items()):
78 try:
79 checked_ids = checked[name]
80 except KeyError:
81 successful = False
82 print(f'{name}: (page missing)')
83 print()
84 else:
85 missing_ids = set(baseline_ids) - set(checked_ids)
86 if missing_ids:
87 missing_ids = {
88 a
89 for a in missing_ids
90 if not IGNORED_ID_RE.fullmatch(a)
91 and (name, a) not in excluded
92 }
93 if missing_ids:
94 successful = False
95 for missing_id in sorted(missing_ids):
96 print(f'{name}: {missing_id}')
97 print()
98 return successful
99
100
101def main(argv):

Callers 1

mainFunction · 0.85

Calls 2

setFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…