基于 AST 和 LLM 自动生成 Python 代码文档(Google Style docstring)。 自动分析代码结构,生成符合 Google Style 的 docstring。
自动分析 Python 代码结构,生成符合 Google Style 的 docstring 文档。
/generate-docs /path/to/your_script.py
/generate-docs /path/to/src/ --recursive
/generate-docs /path/to/src/ --overwrite
/generate-docs /path/to/your_script.py --dry-run
def process_data(data, threshold=0.5):
"""处理输入数据并返回过滤后的结果。
Args:
data (list): 输入数据列表。
threshold (float, optional): 过滤阈值,默认为 0.5。
Returns:
list: 过滤后的数据列表。
Raises:
ValueError: 如果数据格式无效。
"""
pass
--dry-run 预览生成的文档--overwrite 会替换所有现有 docstringZIP package — ready to use