2016-08-18 7 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 
関連する問題