【问题标题】:DoxyPy - Member (variable) of namespace is not documentedDoxyPy - 没有记录命名空间的成员(变量)
【发布时间】:2016-08-18 11:41:47
【问题描述】:

我的 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,以使错误消息消失?

【问题讨论】:

  • 请查看 doxygen 手册中的“Python 中的注释块”段落。用“##”等记录它。

标签: python doxygen


【解决方案1】:

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

【讨论】:

  • 也许"""! 在这里会有所帮助。
【解决方案2】:

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

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

【讨论】:

    猜你喜欢
    • 2014-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-23
    • 1970-01-01
    • 2023-03-13
    • 2017-02-13
    相关资源
    最近更新 更多