From 4945628594d6c1e793b812db8733165e4cd77614 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 8 Jun 2019 13:51:14 +0900 Subject: [PATCH] Fix #6455: napoleon: docstrings for properties are not processed --- CHANGES | 1 + sphinx/ext/napoleon/docstring.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 7043d835d..6341ecaad 100644 --- a/CHANGES +++ b/CHANGES @@ -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 -------- diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 0fea99fb8..5ba65d351 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -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]