Search code examples
python-sphinxrestructuredtext

unsorted list of bullets in a docstring note


It is possible to have a "note box" in a Python docstring using the .. syntax.

.. note::
   This is note text.
   With more than one line.

However, it seems like it is not possible to add an unsorted list:

.. note::
   This is a list:
   * item 1
   * item 2

Am I missing something? Is this even possible? if so, how?


Solution

  • You need to put a blank line between the text and the list:

    .. note::
       This is a list:
    
       * item 1
       * item 2