mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #2093 from Sgiath/napoleon-todo
#2092: Napoleon 'todo' directive
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -51,6 +51,7 @@ Other contributors, listed alphabetically, are:
|
||||
* Stefan Seefeld -- toctree improvements
|
||||
* Shibukawa Yoshiki -- pluggable search API and Japanese search
|
||||
* Antonio Valentino -- qthelp builder
|
||||
* Filip Vavera -- napoleon todo directive
|
||||
* Pauli Virtanen -- autodoc improvements, autosummary extension
|
||||
* Stefan van der Walt -- autosummary extension
|
||||
* Thomas Waldmann -- apidoc module fixes
|
||||
|
||||
1
CHANGES
1
CHANGES
@@ -7,6 +7,7 @@ Incompatible changes
|
||||
Features added
|
||||
--------------
|
||||
|
||||
* #2092: add todo directive support in napoleon package
|
||||
* #1962: when adding directives, roles or nodes from an extension, warn if such
|
||||
an element is already present (built-in or added by another extension).
|
||||
* #1935: Make "numfig_format" overridable in latex_elements.
|
||||
|
||||
@@ -24,6 +24,10 @@ Attributes:
|
||||
one convention to document module level variables and be consistent
|
||||
with it.
|
||||
|
||||
Todo:
|
||||
* For module TODOs
|
||||
* You have to also use ``sphinx.ext.todo`` extension
|
||||
|
||||
.. _Google Python Style Guide:
|
||||
http://google.github.io/styleguide/pyguide.html
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ All of the following section headers are supported:
|
||||
* ``Raises``
|
||||
* ``References``
|
||||
* ``See Also``
|
||||
* ``Todo``
|
||||
* ``Warning``
|
||||
* ``Warnings`` *(alias of Warning)*
|
||||
* ``Warns``
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user