Skip to content

Commit

Permalink
python: workaround gl.Context.current blowing up during doc generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed May 17, 2023
1 parent b5557a9 commit d6fec89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/python/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class DoNotPrintValue: pass
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,
Expand Down

0 comments on commit d6fec89

Please sign in to comment.