Fix #6455: napoleon: docstrings for properties are not processed

This commit is contained in:
Takeshi KOMIYA 2019-06-08 13:51:14 +09:00
parent f0b1cbb734
commit 4945628594
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -555,7 +555,7 @@ class GoogleDocstring:
# type: () -> None # type: () -> None
self._parsed_lines = self._consume_empty() 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 # Implicit stop using StopIteration no longer allowed in
# Python 3.7; see PEP 479 # Python 3.7; see PEP 479
res = [] # type: List[str] res = [] # type: List[str]