From: Robin Dunn Date: Tue, 1 Aug 2006 17:36:33 +0000 (+0000) Subject: Update __DocFilter to skip functions that are duplicates of static X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a8ec3708f6a817bad0d56178e006ebdee967ea8b?ds=inline Update __DocFilter to skip functions that are duplicates of static functions in a class git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/_core_ex.py b/wxPython/src/_core_ex.py index 900cc11f82..3856de4f6f 100644 --- a/wxPython/src/_core_ex.py +++ b/wxPython/src/_core_ex.py @@ -264,10 +264,22 @@ class __DocFilter: def __call__(self, name): import types obj = self._globals.get(name, None) + + # only document classes and function if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]: return False + + # skip other things that are private or will be documented as part of somethign else if name.startswith('_') or name.startswith('EVT') or name.endswith('_swigregister') or name.endswith('Ptr') : return False + + # skip functions that are duplicates of static functions in a class + if name.find('_') != -1: + cls = self._globals.get(name.split('_')[0], None) + methname = name.split('_')[1] + if hasattr(cls, methname) and type(getattr(cls, methname)) is types.FunctionType: + return False + return True #----------------------------------------------------------------------------