3.8. sphinx.ext.inheritance_diagram

Defines a docutils directive for inserting inheritance diagrams.

Provide the directive with one or more classes or modules (separated by whitespace). For modules, all of the classes in that module will be used.

Example:

Given the following classes:

class A: pass
class B(A): pass
class C(A): pass
class D(B, C): pass
class E(B): pass

.. inheritance-diagram: D E

Produces a graph like the following:

            A
           / \
          B   C
         / \ /
        E   D

The graph is inserted as a PNG+image map into HTML and a PDF in LaTeX.

copyright:Copyright 2007-2016 by the Sphinx team, see AUTHORS.
license:BSD, see LICENSE for details.

3.8.1. Functions

force_decode(string, encoding) Forcibly get a unicode string out of a bytestring.
get_graph_hash(node)
html_visit_inheritance_diagram(self, node) Output the graph for HTML.
latex_visit_inheritance_diagram(self, node) Output the graph for LaTeX.
md5 Returns a md5 hash object; optionally initialized with a string
render_dot_html(self, node, code, options[, ...])
render_dot_latex(self, node, code, options)
render_dot_texinfo(self, node, code, options)
setup(app)
skip(self, node)
texinfo_visit_inheritance_diagram(self, node) Output the graph for Texinfo.

3.8.2. Classes

Directive(name, arguments, options, content, ...) Base class for reStructuredText directives.
InheritanceDiagram(name, arguments, options, ...) Run when the inheritance_diagram directive is first encountered.
InheritanceGraph(class_names, currmodule[, ...]) Given a list of classes, determines the set of classes that they inherit from all the way to the root “object”, and then is able to generate a graphviz dot graph from them.
ModuleAnalyzer(source, modname, srcname[, ...])
inheritance_diagram([rawsource]) A docutils node to use as a placeholder for the inheritance diagram.
text_type alias of unicode

3.8.3. Exceptions

InheritanceException