X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/955e46d25d6ac0f9fa55ec9fe11f0c21da3a494d..0eae5d09992c634488c5be14d5a378d6e1dedb71:/wxPython/src/_core_ex.py 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 #----------------------------------------------------------------------------