File: autodocargspec.py

package info (click to toggle)
sphinx-celery 2.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204 kB
  • sloc: python: 719; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 513 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from sphinx.ext import autodoc as _autodoc
from sphinx.util import inspect


def wrapped_getargspec(fun, *args, **kwargs):
    while 1:
        try:
            wrapped = fun.__wrapped__
            if wrapped is fun:
                break
            fun = wrapped
        except AttributeError:
            break
    return inspect.getargspec(fun, *args, **kwargs)


_autodoc.getargspec = wrapped_getargspec


def setup(app):
    app.require_sphinx('1.0')

    return {
        'parallel_read_safe': True
    }