title: How to add inheritance diagram to all modules in Sphinx?
body: <p>So I've been trying to get Sphinx to generate inheritance diagrams for all submodules / classes when generating <code>.rst</code> files through <code>sphinx-apidoc</code>, similar to this <a href="https://stackoverflow.com/questions/27911669/sphinx-how-to-include-inheritance-diagrams">example</a>. But I have not found any built-in features to do this in Sphinx. </p>
  
  <p>The nearest solution I found was to <a href="https://stackoverflow.com/questions/27911669/sphinx-how-to-include-inheritance-diagrams">manually</a> add an inheritance diagram line with the class name to each class docstring in code, but this is not very convenient.</p>
  
  <p>So the question is how do I add inheritance diagrams to all module 
  <code>.rst</code> files?</p>