Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 13b8f3a

Browse files
committed
Skip @Property defs without __doc__
1 parent 0de1eee commit 13b8f3a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

sphinx_automodapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.9.proplot-mods'
1+
__version__ = '0.10.proplot-mods'

sphinx_automodapi/automodsumm.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,15 +576,14 @@ def get_members_class(obj, typ, include_public=[], exclude_public=[],
576576
else:
577577
names = getattr(obj, '__dict__').keys()
578578

579-
# Modification here, only document something if it has a
580-
# docstring! Do not inherit if empty, similar to
581-
# :inherited-members: option
579+
# Modification here, only document something if it has a docstring!
580+
# Do not inherit if empty, similar to :inherited-members: option
582581
for name in names:
583582
try:
584583
documenter = get_documenter(app, safe_getattr(obj, name), obj)
585584
except AttributeError:
586585
continue
587-
if documenter.objtype == 'method' and not getattr(safe_getattr(obj, name), '__doc__', ''):
586+
if documenter.objtype in ('method', 'property') and not getattr(safe_getattr(obj, name), '__doc__', None):
588587
continue
589588
if typ is None or documenter.objtype == typ:
590589
items.append(name)

0 commit comments

Comments
 (0)