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 
相關問題