inheritance¶
Uqbar Sphinx inheritance graph extension.
Install by adding 'uqbar.sphinx.inheritance'
to the extensions
list in
your Sphinx configuration.
Invoke by adding the following directive to your ReST source:
.. inheritance-graph:: some.python.path
This will generate Graphviz output mediated by a
uqbar.apis.InheritanceGraph
instance. You can specify lineage paths
by adding a :lineage:
option to the directive:
.. inheritance-graph:: some.python.path
:lineage: some.lineage.path
Both the main argument to the directive and the lineage option can take multiple paths, separated by spaces:
.. inheritance-graph:: path.one path.two
:lineage: path.three path.four path.five
- class InheritanceDiagram(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶
Bases:
Directive
Runs when the inheritance_diagram directive is first encountered.
-
class inheritance_diagram(rawsource=
''
, *children, **attributes)¶ Bases:
General
,Element
A docutils node to use as a placeholder for the inheritance diagram.
- build_urls(self, node: inheritance_diagram) Mapping[str, str] ¶
Builds a mapping of class paths to URLs.
- html_visit_inheritance_diagram(self, node: inheritance_diagram) None ¶
Builds HTML output from an
inheritance_diagram
node.
- latex_visit_inheritance_diagram(self, node: inheritance_diagram) None ¶
Builds LaTeX output from an
inheritance_diagram
node.
- skip(self, node: inheritance_diagram) None ¶
Skip generating output, for non-supported builders.