From 3cf04907b64c62aa63f0f39082d483792ad0eeef Mon Sep 17 00:00:00 2001 From: Sgiath Date: Mon, 19 Oct 2015 14:21:03 +0200 Subject: [PATCH] #2092: Add support for todo directive --- sphinx/ext/napoleon/docstring.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 4c2348507..219ccd961 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -144,6 +144,7 @@ class GoogleDocstring(UnicodeMixin): 'raises': self._parse_raises_section, 'references': self._parse_references_section, 'see also': self._parse_see_also_section, + 'todo': self._parse_todo_section, 'warning': self._parse_warning_section, 'warnings': self._parse_warning_section, 'warns': self._parse_warns_section, @@ -606,6 +607,10 @@ class GoogleDocstring(UnicodeMixin): lines = self._consume_to_next_section() return self._format_admonition('seealso', lines) + def _parse_todo_section(self, section): + lines = self._consume_to_next_section() + return self._format_admonition('todo', lines) + def _parse_warning_section(self, section): lines = self._consume_to_next_section() return self._format_admonition('warning', lines)