I am new to using Sphinx and stumbled upon a problem while using the autodoc function (sphinx-apidoc).
One of my modules defines a function that uses dynamic inheritance, like this:
def generate_object(base_class, *args, **kwargs):
"""This function create a new class that inherits base_class
"""
class NewClass(base_class):
"""Class that inerherits the base_class
"""
def __init__(self, *args, **kwargs):
super(NewClass, self).__init__(*args, **kwargs)
pass
return NewClass(*args, **kwargs)
I then use the standard sphinx-quickstart in a docs folder and create the necessary .rst files using
sphinx-apidoc -f -o source/ ../
After running make html from the docs folder the generated site shows the documentation for the generate_object method but not for NewClass. How can I ensure that the documentation for NewClass is generated and shown in the documentation?