INNER CODE UNIT · Python
check_runtime
lean-dojo/TorchLean · scripts/generate_unicode_table.py:31
def check_runtime() -> None:
"""Reject runtimes whose character predicates would generate another table."""
actual_python = sys.version_info[:3]
if actual_python != EXPECTED_PYTHON:
raise SystemExit(
"Unicode generation requires CPython "
f"{'.'.join(map(str, EXPECTED_PYTHON))}, found "
f"{'.'.join(map(str, actual_python))}"
)
if unicodedata.unidata_version != EXPECTED_UNICODE:
raise SystemExit(
f"Unicode generation requires {EXPECTED_UNICODE}, found "
f"{unicodedata.unidata_version}"
)
def character_flags(codepoint: int) -> int:
"""Encode the parser-relevant Boolean properties of one code point."""