[英]Document functions from different modules using pdoc
I've got two modules:我有两个模块:
first_module
containing functions a
, b
and c
first_module
包含函数a
, b
和c
second_module
containing functions d
, e
and f
second_module
包含函数d
, e
和f
I would like to generate an HTML documentation using pdoc
such that it doesn't document both modules in whole, but rather contains only functions b
, e
, and f
.我想使用
pdoc
生成HTML文档,这样它不会完整记录两个模块,而是仅包含函数b
、 e
和f
。
Any ideas?有任何想法吗?
You can declare __all__
in your modules as pdoc respects it .你可以在你的模块中声明__all__
,因为pdoc 尊重它。
You can override some docstrings with a __pdoc__
dict in each module:您可以在每个模块中使用
__pdoc__
dict覆盖一些文档字符串:
# first_module.py:
___pdoc___ = {
'a': False,
'c': False,
}
and:和:
# second_module.py:
___pdoc___ = {
'd': False,
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.