From: Vladimír Vondruš Date: Wed, 25 Sep 2024 16:15:37 +0000 (+0200) Subject: documentation/python: expose pybind enum value values as str, not int. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=1361c8816205dd36fc9e1215cd52e69383627420;p=blog.git documentation/python: expose pybind enum value values as str, not int. The template apparently doesn't care, but calling html.escape() on that thing is an error. --- diff --git a/documentation/python.py b/documentation/python.py index 34302d98..2e10ca7d 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -1467,7 +1467,7 @@ def extract_enum_doc(state: State, entry: Empty): value = Empty() value. name = name value.id = state.config['ID_FORMATTER'](EntryType.ENUM_VALUE, entry.path[-1:] + [name]) - value.value = int(v) + value.value = str(int(v)) value.content = '' out.values += [value]