copy back __doc__ for proper sphinx doc generation
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 04 Feb 2010 13:17:26 +0100
changeset 4458 6151849f41e0
parent 4451 65f4665233e6
child 4459 f628abfb3a6c
copy back __doc__ for proper sphinx doc generation
appobject.py
selectors.py
--- a/appobject.py	Thu Feb 04 10:17:15 2010 +0100
+++ b/appobject.py	Thu Feb 04 13:17:26 2010 +0100
@@ -32,7 +32,8 @@
 
     """
     return type(selector_func.__name__, (Selector,),
-                {'__call__': lambda self, *args, **kwargs: selector_func(*args, **kwargs)})
+                {'__doc__': selector_func.__doc__,
+                 '__call__': lambda self, *a, **kw: selector_func(*a, **kw)})
 
 
 def _instantiate_selector(selector):
--- a/selectors.py	Thu Feb 04 10:17:15 2010 +0100
+++ b/selectors.py	Thu Feb 04 13:17:26 2010 +0100
@@ -83,6 +83,7 @@
             print '%s -> %s for %s(%s)' % (selname, ret, vobj, vobj.__regid__)
         return ret
     traced.__name__ = selector.__name__
+    traced.__doc__ = selector.__doc__
     return traced
 
 class traced_selection(object):