mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
PyDoc: fix missing classmethod docs for Python classes
Classmethod descriptors were not handled, causing methods in bpy_extras.anim_utils and bpy_extras.asset_utils to be excluded from documentation entirely.
This commit is contained in:
parent
a977e71471
commit
3fbd91578b
1 changed files with 6 additions and 0 deletions
|
|
@ -1204,6 +1204,12 @@ def pyclass2sphinx(fw, module_name, type_name, value, write_class_examples):
|
|||
if type(descr) == GetSetDescriptorType:
|
||||
py_descr2sphinx(" ", fw, descr, module_name, type_name, key, is_class=True)
|
||||
|
||||
# Needed for pure Python classes.
|
||||
for key, descr in descr_items:
|
||||
if type(descr) == classmethod:
|
||||
descr = getattr(value, key)
|
||||
pyfunc2sphinx(" ", fw, module_name, type_name, key, descr, is_class=True)
|
||||
|
||||
for key, descr in descr_items:
|
||||
if type(descr) == StaticMethodType:
|
||||
descr = getattr(value, key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue