We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a999cd commit d402884Copy full SHA for d402884
1 file changed
docs/conf.py
@@ -269,3 +269,24 @@
269
pygments_style = 'tango'
270
html_theme = 'default'
271
html_theme_options = {}
272
+
273
274
+# unwrap decorators
275
+def unwrap_decorators():
276
+ import sphinx.util.inspect as inspect
277
+ import functools
278
279
+ old_getargspec = inspect.getargspec
280
+ def getargspec(x):
281
+ return old_getargspec(getattr(x, '_original_function', x))
282
+ inspect.getargspec = getargspec
283
284
+ old_update_wrapper = functools.update_wrapper
285
+ def update_wrapper(wrapper, wrapped, *a, **kw):
286
+ rv = old_update_wrapper(wrapper, wrapped, *a, **kw)
287
+ rv._original_function = wrapped
288
+ return rv
289
+ functools.update_wrapper = update_wrapper
290
291
+unwrap_decorators()
292
+del unwrap_decorators
0 commit comments