logo
  • 教程列表
  • SO官方文档
  • 使用 autodoc 编写文档字符串
    • 安装 autodoc 扩展
    • 在 sphinx 配置中添加代码路径
  1. StackOverflow 文档
  2. python-sphinx 教程
  3. 使用 autodoc 编写文档字符串
  4. 在 sphinx 配置中添加代码路径

在 sphinx 配置中添加代码路径

Created: November-22, 2018

Autodoc 需要导入你的模块才能工作。

你可以在 conf.py 文件中包含代码路径。

例如:

import os
sys.path.insert(0, os.path.abspath('../src'))
  • 安装 autodoc 扩展

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明