From 775f0d76d55b2977c30dcd0f9306437ae520d63f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Apr 2022 13:04:35 +1000 Subject: Fix missing C/Python methods in API docs The following methods weren't included in API docs. - BlendDataLibraries.load - BlendDataLibraries.write - Text.region_as_string - Text.region_from_string --- release/scripts/modules/rna_info.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index a8814759840..b009cc4fefe 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -198,7 +198,11 @@ class InfoStructRNA: for identifier, attr in self._get_py_visible_attrs(): # methods may be python wrappers to C functions attr_func = getattr(attr, "__func__", attr) - if type(attr_func) in {types.BuiltinMethodType, types.BuiltinFunctionType}: + if ( + (type(attr_func) in {types.BuiltinMethodType, types.BuiltinFunctionType}) or + # Without the `objclass` check, many inherited methods are included. + (type(attr_func) == types.MethodDescriptorType and attr_func.__objclass__ == self.py_class) + ): functions.append((identifier, attr)) return functions -- cgit v1.2.3