Merge pull request #6457 from tk0miya/6455_napoleon_ignores_properties

Fix #6455: napoleon: docstrings for properties are not processed
This commit is contained in:
Takeshi KOMIYA 2019-06-10 00:43:12 +09:00 committed by GitHub
commit 783de00bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ Bugs fixed
immediately preceding section title by pagebreak
* #6448: autodoc: crashed when autodocumenting classes with ``__slots__ = None``
* #6452: autosummary: crashed when generating document of properties
* #6455: napoleon: docstrings for properties are not processed
Testing
--------

View File

@ -555,7 +555,7 @@ class GoogleDocstring:
# type: () -> None
self._parsed_lines = self._consume_empty()
if self._name and (self._what == 'attribute' or self._what == 'data'):
if self._name and self._what in ('attribute', 'data', 'property'):
# Implicit stop using StopIteration no longer allowed in
# Python 3.7; see PEP 479
res = [] # type: List[str]