8

Assume I have the following structure

mypackage
    __init__.py
    core.py

With __init__.py:

from .core import my_function

__all__ = ['my_function']

And core.py

def myfunction():
    ''' really cool function '''
    pass

Running sphinx-apidoc --full -o docs and python setup.py build_sphinx I get the documentation of myfunction twice.

How can I avoid this duplication, preferably with having the documentation only at the toplevel (as this is the API intended for the users).

MaxNoe
  • 14,470
  • 3
  • 41
  • 46
  • Related: http://stackoverflow.com/questions/29385564/customize-templates-for-sphinx-apidoc – mzjn Apr 10 '17 at 09:57

0 Answers0