Description
I am using Sphinx with apidoc
and coverage
. apidoc
automatically includes the :undoc-members:
option for its generated source files. This is not a problem in itself, but when combined with sphinx.ext.coverage
can lead to confusing behavior.
According to this Stack Overflow answer and personal testing, sphinx.ext.coverage
counts members that have been included with :undoc-members:
as "documented." This seems to me to be confusing and perhaps unintended.
There are two options for resolving this that I can see:
- Add an option to
sphinx.ext.coverage
to ignore members that are only documented via:undoc-members:
. - Add a warning to
sphinx.ext.coverage
's documentation pointing out this behavior.
Perhaps both of these should be implemented, but the second is certainly the simpler short-term solution.
EDIT: Note that this applies to using sphinx.ext.coverage
without apidoc
as well--that situation is only where I came across this problem.