mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Constructors that are callables but not python functions fail silently now on documentation.
This commit is contained in:
parent
48b6a0e838
commit
1f5735f371
@ -242,7 +242,8 @@ def format_signature(what, obj):
|
||||
# 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 \
|
||||
|
Loading…
Reference in New Issue
Block a user