Skip to content

how to make sphinx.ext.todo render in a docstring with sphinx.ext.napoleon #12306

Answered by picnixz
raybellwaves asked this question in Q&A
Discussion options

You must be logged in to vote

Ok I managed to make it work:

  1. You need to include todo_include_todos = True (but you probably had it already).
  2. You need two new lines before the .. todo directive, namely:
"""
Return a list of random ingredients as strings.

Parameters
----------
kind : list[str]
    Optional “kind” of ingredients.

Returns
-------
The ingredients list: list[str]


.. todo:: ???
"""

By the way, thanks to you I was able to find a totally unrelated bug which, when you put 4 "?", it doesn't work!

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@raybellwaves
Comment options

@raybellwaves
Comment options

@raybellwaves
Comment options

@picnixz
Comment options

Answer selected by raybellwaves
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants