title: sphinx autodoc dynamic inheritance
body: <p>I am new to using Sphinx and stumbled upon a problem while using the autodoc function (<code>sphinx-apidoc</code>).</p>
  
  <p>One of my modules defines a function that uses dynamic inheritance, like this:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>I then use the standard <code>sphinx-quickstart</code> in a <code>docs</code> folder and create the necessary <code>.rst</code> files using</p>
  
  <pre><code>sphinx-apidoc -f -o source/ ../
  </code></pre>
  
  <p>After running <code>make html</code> from the <code>docs</code> folder the generated site shows the documentation for the <code>generate_object</code> method but not for <code>NewClass</code>. How can I ensure that the documentation for <code>NewClass</code> is generated and shown in the documentation?</p>
  
  <p>The code can be found <a href="https://github.com/BartKeulen/smartstart/blob/master/smartstart/smartexploration/smartexploration.py" rel="nofollow noreferrer">here</a>, and the documentation <a href="https://bartkeulen.github.io/smartstart/source/smartstart.smartexploration.html#module-smartstart.smartexploration.smartexploration" rel="nofollow noreferrer">here</a></p>