MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / _invariants

Function _invariants

scripts/website/bulk_mechanical_fix.py:124–131  ·  view source on GitHub ↗

Return the multiset-ish fingerprints that must not change.

(body)

Source from the content-addressed store, hash-verified

122
123
124def _invariants(body):
125 """Return the multiset-ish fingerprints that must not change."""
126 return {
127 "code_spans": sorted(re.findall(r"`[^`]*`", body)),
128 "shortcodes": sorted(re.findall(r"\{\{[<%].*?[%>]\}\}", body, re.DOTALL)),
129 "links": sorted(re.findall(r"\]\([^)]*\)", body)),
130 "words": re.findall(r"\S+", body), # no word added/removed/reordered
131 }
132
133
134def process_file(path, opts, counts):

Callers 1

process_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected