pdoc icon indicating copy to clipboard operation
pdoc copied to clipboard

Exclude empty submodule from docs

Open amin-nejad opened this issue 3 years ago • 1 comments

Pdoc by default ignores private classes/functions (names with a leading underscore) in a module from the documentation. However if a module consists entirely of private classes and functions, the submodule still appears within the documentation, except it is simply empty (or displaying just the docstring if there is one). How can I automatically tell pdoc to ignore the module if it doesn't find anything public? I don't want this to be manual because modules change and at some point the module may have something public in it. And I have many modules like this

Additional info

  • pdoc version: 0.10.0

amin-nejad avatar Dec 21 '21 14:12 amin-nejad

One hack is to make the submodule itself private. Having no public classes or functions, this seems reasonable. But as you pointed out, this is only a hack and not a solution.

braniii avatar Apr 26 '22 15:04 braniii