mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #814: autodoc: Guard against strange type objects that don't have
``__bases__``.
This commit is contained in:
parent
fdb3a5ada8
commit
7a26dd0730
5
CHANGES
5
CHANGES
@ -23,6 +23,11 @@ Bugs fixed
|
||||
|
||||
* #751: Allow production lists longer than a page in LaTeX by using longtable.
|
||||
|
||||
* #764: Always look for stopwords lowercased in JS search.
|
||||
|
||||
* #814: autodoc: Guard against strange type objects that don't have
|
||||
``__bases__``.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
|
@ -1052,7 +1052,7 @@ class ClassDocumenter(ModuleLevelDocumenter):
|
||||
# add inheritance info, if wanted
|
||||
if not self.doc_as_attr and self.options.show_inheritance:
|
||||
self.add_line(u'', '<autodoc>')
|
||||
if len(self.object.__bases__):
|
||||
if hasattr(self.object, '__bases__') and len(self.object.__bases__):
|
||||
bases = [b.__module__ == '__builtin__' and
|
||||
u':class:`%s`' % b.__name__ or
|
||||
u':class:`%s.%s`' % (b.__module__, b.__name__)
|
||||
|
Loading…
Reference in New Issue
Block a user