3

I couldn't figure out how to create a bullet list for Raises. See below. Is it even possible? What I got is a single bullet point for RuntimeError (same for ValueError). Like:

   Raises:      • RuntimeError -
                     ◦ case1: when x happens * case 2: when y happens
                • ValueError -
                     ◦ a is not all lowercase * current day is Sunday
class A
    def f1(self, a: str):
        """f1

        Parameters
        ----------
        a: str
            a

        Raises
        ------
        RuntimeError
            * case 1: when x happens
            * case 2: when y happens

        ValueError
            * ``a`` is not all lowercase
            * current day is Sunday
        """
mzjn
  • 48,958
  • 13
  • 128
  • 248
wood stock
  • 31
  • 2
  • I don't think the NumPy (or Google) style supports bullet lists in docstring sections such as `Raises`. You can have a single paragraph of plain text. See https://numpydoc.readthedocs.io/en/latest/format.html#raises. – mzjn Jun 24 '21 at 06:53
  • Additional information. Visual Studio Code render the above as what I want (when I mouse over the function) – wood stock Jun 24 '21 at 23:43

0 Answers0