【发布时间】:2021-04-12 23:44:28
【问题描述】:
我有一个 Python 项目,我在其中使用 restructuredText 来评论/记录我的每个类/函数。这是我的文档字符串的示例:
"""
Updates the contacts birth date in batch
:param nb_contacts: nb_contacts: number of contacts to update
:param batch_size: size of the batch
:param context: airflow context
:return: true if update is successful
"""
我想从我的代码中生成 .md 文件。有什么办法吗?
【问题讨论】:
-
预期输出是什么?
-
只是寻找可以很好地显示在 git 上的东西和人类可读的 .md doc 文件。与 sphinx 生成的 .html 文档具有相同结构但在 .md 文件中的文档
-
请注意,cmets 和 docstrings 是两个不同的东西。你的问题是一个文档字符串。
标签: python markdown documentation restructuredtext