From d6fec89dc5077d3c3b28488c1b5ab49f887b2b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 17 May 2023 12:24:58 +0200 Subject: [PATCH] python: workaround gl.Context.current blowing up during doc generation. --- doc/python/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/python/conf.py b/doc/python/conf.py index d89f3ad..26e7143 100644 --- a/doc/python/conf.py +++ b/doc/python/conf.py @@ -57,6 +57,14 @@ magnum.TARGET_WEBGL = DoNotPrintValue() magnum.TARGET_EGL = DoNotPrintValue() magnum.TARGET_VK = DoNotPrintValue() +# Otherwise it blows during doc generation up because there's no content +# TODO is there a way to make Python not execute the property when inspecting +# it?! +# TODO also, it's a static property together with has_current, and as such it +# has no docstring -- fix +delattr(magnum.gl.Context, 'current') +setattr(magnum.gl.Context, 'current', DoNotPrintValue()) + # TODO ugh... can this be expressed directly in pybind? and the docs parsed # from it so i don't need to repeat them in docs/*.rst files? for i in [magnum.text.AbstractFont,