forked from bartvdbraak/blender
Fix for including docstrings of static methods.
This commit is contained in:
parent
7a4a3ec626
commit
11fc330f7e
@ -147,6 +147,7 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
|
|||||||
# lame, python wont give some access
|
# lame, python wont give some access
|
||||||
MethodDescriptorType = type(dict.get)
|
MethodDescriptorType = type(dict.get)
|
||||||
GetSetDescriptorType = type(int.real)
|
GetSetDescriptorType = type(int.real)
|
||||||
|
StaticMethodType = type(staticmethod(lambda: None))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -225,6 +226,12 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
|
|||||||
write_indented_lines(" ", fw, descr.__doc__, False)
|
write_indented_lines(" ", fw, descr.__doc__, False)
|
||||||
write_example_ref(" ", fw, module_name + "." + attribute + "." + key)
|
write_example_ref(" ", fw, module_name + "." + attribute + "." + key)
|
||||||
fw("\n")
|
fw("\n")
|
||||||
|
elif type(descr) == StaticMethodType:
|
||||||
|
descr = getattr(value, key)
|
||||||
|
if descr.__doc__:
|
||||||
|
write_indented_lines(" ", fw, descr.__doc__, False)
|
||||||
|
write_example_ref(" ", fw, module_name + "." + attribute + "." + key)
|
||||||
|
fw("\n")
|
||||||
|
|
||||||
fw("\n\n")
|
fw("\n\n")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user