We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents eeeae29 + 026c9be commit f0c4953Copy full SHA for f0c4953
doc/sphinxext/numpydoc/docscrape.py
@@ -499,10 +499,14 @@ def splitlines_x(s):
499
for field, items in [('Methods', self.methods),
500
('Attributes', self.properties)]:
501
if not self[field]:
502
- self[field] = [
503
- (name, '',
504
- splitlines_x(pydoc.getdoc(getattr(self._cls, name))))
505
- for name in sorted(items)]
+ doc_list = []
+ for name in sorted(items):
+ try:
+ doc_item = pydoc.getdoc(getattr(self._cls, name))
506
+ doc_list.append((name, '', splitlines_x(doc_item)))
507
+ except AttributeError:
508
+ pass # method doesn't exist
509
+ self[field] = doc_list
510
511
@property
512
def methods(self):
0 commit comments