MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / append_dictionary_file_examples

Function append_dictionary_file_examples

data/scripts/opencc_resources_zip_diff.py:107–113  ·  view source on GitHub ↗
(lines, entries)

Source from the content-addressed store, hash-verified

105
106
107def append_dictionary_file_examples(lines, entries):
108 if entries is None:
109 return
110 for key in sorted(entries)[:MAX_EXAMPLES]:
111 lines.append(f" - `{key}` -> `{entries[key]}`")
112 if len(entries) > MAX_EXAMPLES:
113 lines.append(f" - ... {len(entries) - MAX_EXAMPLES} more")
114
115
116def append_text_diff(lines, name, before_text, after_text):

Callers 1

write_reportFunction · 0.85

Calls 2

lenFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected