未记录命名空间的DoxyPy成员(变量)

2024-04-26 10:09:46 发布

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

我收到doxygen(doxypy)文档的错误消息warning: Member constant1 (variable) of namespace <file_name> is not documented.。我已经记录了文件以及所有函数和类。但是我在这个文件中还有一些额外的常量,我不知道如何记录,我得到了错误消息。文件如下所示:

"""\file
\brief <this is what the file contains>
\author <author>
"""

import numpy as np

constant1 = 24
constant2 = 48

def someFunction():
    """ Doxygen documentation of someFunction() """
    <body>

在这个例子中,我如何记录constant1和{},这样错误消息就消失了?在


Tags: 文件of文档消息is错误记录file
1条回答
网友
1楼 · 发布于 2024-04-26 10:09:46

@艾伯特是对的。当在变量前面放一个##时,它是有效的。我没有找到使用"""语法的解决方案。在

"""\file
\brief <this is what the file contains>
\author <author>
"""

import numpy as np

## Doxygen documentation for constant1
constant1 = 24

## Doxygen documentation for constant2
constant2 = 48

def someFunction():
    """ Doxygen documentation of someFunction() """
    <body>
网友
2楼 · 发布于 2024-04-26 10:09:46

如果您需要(因为任何原因)为这些成员准备更多文档,您也可以将文本拆分成几行。它将被视为"""块。在

## Doxygen documentation for constant1. The way which you already found.
constant1 = 24
## Doxygen documentation for constant2.
#  If you need to write a lot about constant2, you can split the text into
#  several lines in this way.
constant2 = 48

相关问题 更多 >