diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-04-13 04:55:37 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-04-13 04:55:37 +0400 |
commit | 11fc330f7ecfcb60bac3e29a83016ec7dfb85182 (patch) | |
tree | effec85d7e9180b3422a726d21be1170b5f19dea /source/blender | |
parent | 7a4a3ec62667f55a899cb9c075c8883bc00a54c8 (diff) |
Fix for including docstrings of static methods.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/python/doc/sphinx_doc_gen.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/python/doc/sphinx_doc_gen.py b/source/blender/python/doc/sphinx_doc_gen.py index 4b860f4a75b..9948b04136c 100644 --- a/source/blender/python/doc/sphinx_doc_gen.py +++ b/source/blender/python/doc/sphinx_doc_gen.py @@ -147,6 +147,7 @@ def pymodule2sphinx(BASEPATH, module_name, module, title): # lame, python wont give some access MethodDescriptorType = type(dict.get) 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_example_ref(" ", fw, module_name + "." + attribute + "." + key) 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") |