2016-08-18 62 views
0

对于我的doxygen(doxypy)文档,我收到错误消息warning: Member constant1 (variable) of namespace <file_name> is not documented.。我已经记录了该文件以及所有功能和类。但我也有一些额外的常量在这个文件中,我不知道如何记录和我得到的错误信息。该文件是这样的:DoxyPy - 没有记录名称空间的成员(变量)

"""\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,从而使错误讯息消失?

+1

请查看doxygen手册中的“Python中的注释块”段落。用“##”等文件记录 – albert

回答

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