diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-03-19 22:58:15 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-03-19 22:58:15 +0900 |
commit | aa1bc83c2ac9357b39048b555c3fdb0efff3449c (patch) | |
tree | c1149670ca18b5f9820505322d5b0a5832395ea4 /sphinx/ext/inheritance_diagram.py | |
parent | 759a526b12213c59d6ae4c8f66682f4328b764f4 (diff) | |
parent | 017ef6118b4fe588140266ad6ff2393cbddd9137 (diff) | |
download | sphinx-git-aa1bc83c2ac9357b39048b555c3fdb0efff3449c.tar.gz |
Merge branch '4.x'
Diffstat (limited to 'sphinx/ext/inheritance_diagram.py')
-rw-r--r-- | sphinx/ext/inheritance_diagram.py | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py index cf4626c0b..c8a3dc763 100644 --- a/sphinx/ext/inheritance_diagram.py +++ b/sphinx/ext/inheritance_diagram.py @@ -1,38 +1,31 @@ -r""" - sphinx.ext.inheritance_diagram - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +r"""Defines a docutils directive for inserting inheritance diagrams. - 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. - 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:: - Example:: + Given the following classes: - Given the following classes: + class A: pass + class B(A): pass + class C(A): pass + class D(B, C): pass + class E(B): pass - class A: pass - class B(A): pass - class C(A): pass - class D(B, C): pass - class E(B): pass + .. inheritance-diagram: D E - .. inheritance-diagram: D E + Produces a graph like the following: - Produces a graph like the following: + A + / \ + B C + / \ / + E D - A - / \ - B C - / \ / - E D - - The graph is inserted as a PNG+image map into HTML and a PDF in - LaTeX. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +The graph is inserted as a PNG+image map into HTML and a PDF in +LaTeX. """ import builtins |