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

时间:2016-08-18 11:41:48

标签: python doxygen

我收到了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>

在此示例中,如何记录constant1constant2,以便错误消息消失?

2 个答案:

答案 0 :(得分:0)

@albert是对的。将##放在变量前面时可以正常工作。我没有找到使用"""语法的解决方案。

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

答案 1 :(得分:0)

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

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