diff --git a/nominal_refactor_advisor/native_compilation.py b/nominal_refactor_advisor/native_compilation.py index 223e2b8d..c58b068d 100644 --- a/nominal_refactor_advisor/native_compilation.py +++ b/nominal_refactor_advisor/native_compilation.py @@ -4196,7 +4196,9 @@ def __new__( SLOTS = "__slots__" CLASS_CELL = "__classcell__" CLASS_DICTIONARY_CELL = "__classdictcell__" - DOCUMENTATION = "__doc__", _require_documentation, "\ud800" + # A lone surrogate, which no text encoding accepts. Built by chr so type checkers + # infer str: mypy 2.3 crashes writing the literal '\ud800' to its UTF-8 cache. + DOCUMENTATION = "__doc__", _require_documentation, chr(0xD800) @cached_property def native_active(self) -> bool: