chiark / gitweb /
documentation/python: expose pybind enum value values as str, not int.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 25 Sep 2024 16:15:37 +0000 (18:15 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 28 Sep 2024 01:44:29 +0000 (03:44 +0200)
The template apparently doesn't care, but calling html.escape() on that
thing is an error.

documentation/python.py

index 34302d98995be07dc57e375ee9fafe75d1f6e271..2e10ca7d81ab20859a69300b04ad59a18ff0d16d 100755 (executable)
@@ -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]