如何在文档字符串中为“Raises”添加项目符号列表?

问题描述

我不知道如何为 Raises 创建项目符号列表。见下文。甚至有可能吗?我得到的是 RuntimeError一个要点(ValueError 相同)。 喜欢:

   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
        """

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)