sphinx-automodapi icon indicating copy to clipboard operation
sphinx-automodapi copied to clipboard

"duplicate object description" warning for classes/functions defined in __init__.py.

Open mjstahlberg opened this issue 7 years ago • 0 comments

Hello,

I have an __init__.py file that defines an exception and a number of functions. I want to document it as follows (from /…/src/picos/doc/api/solvers.rst):

.. automodapi:: picos.solvers
  :no-heading:
  :headings: =-

The documentation generates fine, but I get the following warnings

/…/src/picos/picos/solvers/__init__.py:docstring of picos.solvers.NoAppropriateSolverError:1: WARNING: duplicate object description of picos.solvers.NoAppropriateSolverError, other instance in /…/src/picos/doc/api/solvers.rst, use :noindex: for one of them
/…/src/picos/picos/solvers/__init__.py:docstring of picos.solvers.all_solvers:1: WARNING: duplicate object description of picos.solvers.all_solvers, other instance in /…/src/picos/doc/api/solvers.rst, use :noindex: for one of them
/…/src/picos/picos/solvers/__init__.py:docstring of picos.solvers.available_solvers:1: WARNING: duplicate object description of picos.solvers.available_solvers, other instance in /…/src/picos/doc/api/solvers.rst, use :noindex: for one of them
/…/src/picos/picos/solvers/__init__.py:docstring of picos.solvers.get_solver:1: WARNING: duplicate object description of picos.solvers.get_solver, other instance in /…/src/picos/doc/api/solvers.rst, use :noindex: for one of them
/…/src/picos/picos/solvers/__init__.py:docstring of picos.solvers.potential_solvers:1: WARNING: duplicate object description of picos.solvers.potential_solvers, other instance in /…/src/picos/doc/api/solvers.rst, use :noindex: for one of them
/…/src/picos/picos/solvers/__init__.py:docstring of picos.solvers.suggested_solver:1: WARNING: duplicate object description of picos.solvers.suggested_solver, other instance in /…/src/picos/doc/api/solvers.rst, use :noindex: for one of them

I verified that these are the only definitions of the exception and the functions in question.

I don't know how to get rid of the warnings and I suspect that this is an issue with automodapi.

mjstahlberg avatar Nov 07 '18 19:11 mjstahlberg