Add __docfilter__ to modules so epydoc doesn't generate docs for all

the SWIG crud in the modules it doesn't need to.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-04-22 23:25:20 +00:00
parent a400c2ec04
commit 5b29df3fee
15 changed files with 32 additions and 0 deletions

View File

@ -25,6 +25,7 @@
%import core.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr);

View File

@ -36,6 +36,7 @@
%import windows.i
%import controls.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
MAKE_CONST_WXSTRING2(DynamicSashNameStr, wxT("dynamicSashWindow"));

View File

@ -25,6 +25,7 @@
%import core.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
MAKE_CONST_WXSTRING2(GLCanvasNameStr, wxT("GLCanvas"));

View File

@ -25,6 +25,7 @@
%import core.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr);

View File

@ -24,6 +24,7 @@
%import windows.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);

View File

@ -25,6 +25,7 @@
%import core.i
%import misc.i // for DnD
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
MAKE_CONST_WXSTRING(STCNameStr);

View File

@ -27,6 +27,7 @@
%import core.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);

View File

@ -213,6 +213,24 @@ class FutureCall:
wx.CallAfter(self.Stop)
#----------------------------------------------------------------------------
# Control which items in this module should be documented by epydoc.
# We allow only classes and functions, which will help reduce the size
# of the docs by filtering out the zillions of constants, EVT objects,
# and etc that don't make much sense by themselves, but are instead
# documented (or will be) as part of the classes/functions/methods
# where they should be used.
def __docfilter__(name):
import types
obj = globals().get(name, None)
if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
return False
if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
return False
return True
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------

View File

@ -24,6 +24,7 @@
%import misc.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
%include _calendar_rename.i

View File

@ -23,6 +23,7 @@
%import core.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
%include _controls_rename.i

View File

@ -24,6 +24,7 @@
%import core.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
%include _gdi_rename.i

View File

@ -27,6 +27,7 @@
%import windows.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
%include _grid_rename.i

View File

@ -30,6 +30,7 @@
%import windows.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
%include _html_rename.i

View File

@ -26,6 +26,7 @@
%import core.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
%include _misc_rename.i

View File

@ -25,6 +25,7 @@
%import core.i
%pythoncode { wx = core }
%pythoncode { __docfilter__ = wx.__docfilter__ }
%include _windows_rename.i