如何避免使用Sphinx复制函数文档?

Max*_*Noe 5 python python-sphinx

假设我有以下结构

mypackage
    __init__.py
    core.py
Run Code Online (Sandbox Code Playgroud)

__init__.py

from .core import my_function

__all__ = ['my_function']
Run Code Online (Sandbox Code Playgroud)

core.py

def myfunction():
    ''' really cool function '''
    pass
Run Code Online (Sandbox Code Playgroud)

运行sphinx-apidoc --full -o docspython setup.py build_sphinx 我得到myfunction两次的文档。

如何避免这种重复,最好仅在顶层使用文档(因为这是针对用户的API)。