##// END OF EJS Templates
Simplify oinspect.getdoc....
Antony Lee -
Show More
@@ -123,18 +123,11 b' def getdoc(obj):'
123 123 except Exception:
124 124 pass
125 125 else:
126 # if we get extra info, we add it to the normal docstring.
127 126 if isinstance(ds, str):
128 127 return inspect.cleandoc(ds)
129 try:
130 docstr = inspect.getdoc(obj)
131 encoding = get_encoding(obj)
132 return py3compat.cast_unicode(docstr, encoding=encoding)
133 except Exception:
134 # Harden against an inspect failure, which can occur with
135 # extensions modules.
136 raise
137 return None
128 docstr = inspect.getdoc(obj)
129 encoding = get_encoding(obj)
130 return py3compat.cast_unicode(docstr, encoding=encoding)
138 131
139 132
140 133 def getsource(obj, oname=''):
General Comments 0
You need to be logged in to leave comments. Login now