Python cod中Doxygen成员组和doxypypy类型提示

2024-09-29 10:26:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用doxygendoxypypy来记录Python源代码。在

class Test:
    """
    This is a test class.

    The thest class only serves the purpose of a MWE.

    Attributes:
        memberA (int): This is member A.
        memberB (int): This is member B.
        memberC (int): This is member C. A and B never invite C to their party.
    """

    def __init__(self):
        self.memberA = []
        self.memberB = []
        self.memberC = []

我现在想将成员A和{}分组到member group(通过使用@{和{}等),但是在docstring中实现这一点的几次尝试都是徒劳的。实现这一点的正确语法是什么?(我对Python来说是全新的,我来自C++方面…我使用谷歌评论风格)

编辑:另外,到目前为止,我还没有找到我可以使用的格式。我知道如何使用特殊的命令?在

EDIT2:我还发现,doxygen/doxypypy忽略类型提示。。。有人知道如何把它们包括在内吗?在

编辑3:成员组可以使用

^{pr2}$

Tags: self编辑源代码is记录成员thisclass