##// END OF EJS Templates
Display source code correctly for decorated functions....
Ben Edwards -
Show More
@@ -129,10 +129,13 b' def getsource(obj,is_binary=False):'
129 129 - is_binary: whether the object is known to come from a binary source.
130 130 This implementation will skip returning any output for binary objects, but
131 131 custom extractors may know how to meaningfully process them."""
132
132
133 133 if is_binary:
134 134 return None
135 135 else:
136 #get source if obj was decoratred with @decorator
137 if hasattr(obj,"__wrapped__"):
138 obj = obj.__wrapped__
136 139 try:
137 140 src = inspect.getsource(obj)
138 141 except TypeError:
General Comments 0
You need to be logged in to leave comments. Login now