MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / parse_unicode_data

Function parse_unicode_data

misc/scripts/ucaps_fetch.py:25–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def parse_unicode_data() -> None:
26 lines: List[str] = [line.decode("utf-8") for line in urlopen(URL)]
27
28 for line in lines:
29 split_line: List[str] = line.split(";")
30
31 code_value: str = split_line[0].strip()
32 uppercase_mapping: str = split_line[12].strip()
33 lowercase_mapping: str = split_line[13].strip()
34
35 if uppercase_mapping:
36 lower_to_upper.append((f"0x{code_value}", f"0x{uppercase_mapping}"))
37 if lowercase_mapping:
38 upper_to_lower.append((f"0x{code_value}", f"0x{lowercase_mapping}"))
39
40
41def make_cap_table(table_name: str, len_name: str, table: List[Tuple[str, str]]) -> str:

Callers 1

generate_ucaps_fetchFunction · 0.70

Calls 4

splitMethod · 0.80
stripMethod · 0.80
decodeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected