2

I am building a package that uses Keras classes.
I am generating my documentation with Sphinx, using the Google docstring convention with sphinx-napoleon to parse it.

Some of my methods override Keras methods and are not documented, so the Sphinx autodoc inherit the docstrings from the original overridden method in Keras.

Unfortunately, the documentation in Keras does not follow the Google nor the NumPy, nor the reST docstring convention. It is a kind of Google convention with '#' symbols from markdown I think, here is an example:

def keras_doc_example(inputs, **kwargs):
"""
# Arguments
    inputs: Can be a tensor or list/tuple of tensors.
    **kwargs: Additional keyword arguments.

# Returns
    An output.
"""

So when I build my documentation, all documentation from Keras docstrings look broken with unrecognized '#' symbols.

What is the way to correctly parse this Keras docstring convention?

bad_coder
  • 11,289
  • 20
  • 44
  • 72

0 Answers0