Commits

Anonymous committed 48d2f2d

Constructors that are callables but not python functions fail silently now on documentation.

  • Participants
  • Parent commits 9a95fd8

Comments (0)

Files changed (1)

File sphinx/ext/autodoc.py

         # for classes, the relevant signature is the __init__ method's
         obj = getattr(obj, '__init__', None)
         # classes without __init__ method?
-        if obj is None or obj is object.__init__:
+        if obj is None or obj is object.__init__ or not \
+           (inspect.ismethod(obj) or inspect.isfunction(obj)):
             return ''
     argspec = inspect.getargspec(obj)
     if what in ('class', 'method') and argspec[0] and \