include getset's for generating module docs.

used for bpy.debug/tempdir/driver_namespace which were previously undocumented.
This commit is contained in:
2010-12-06 12:36:55 +00:00
parent d64f46e0bb
commit 25bd57b0a1
2 changed files with 14 additions and 4 deletions

View File

@@ -224,6 +224,16 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
# write members of the module
# only tested with PyStructs which are not exactly modules
for key, descr in sorted(type(module).__dict__.items()):
if key.startswith("__"):
continue
# naughty, we also add getset's into PyStructs, this is not typical py but also not incorrect.
if type(descr) == types.GetSetDescriptorType: # 'bpy_app_type' name is only used for examples and messages
py_descr2sphinx("", fw, descr, module_name, "bpy_app_type", key)
attribute_set.add(key)
for key, descr in sorted(type(module).__dict__.items()):
if key.startswith("__"):
continue
if type(descr) == types.MemberDescriptorType:
if descr.__doc__:
fw(".. data:: %s\n\n" % key)