From 50ad99bdc0338e3257e0e131ed09f12e1642714f Mon Sep 17 00:00:00 2001 From: Lukas Tenbrink Date: Sun, 22 Sep 2024 20:56:20 +0200 Subject: [PATCH] In make_rst.py, include the parent class in 'Inherits:' even if it is not known. --- doc/tools/make_rst.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 101660881bfa..eec771ca60f4 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -949,13 +949,17 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: inherits = class_def.inherits.strip() f.write(f'**{translate("Inherits:")}** ') first = True - while inherits in state.classes: + while inherits is not None: if not first: f.write(" **<** ") else: first = False f.write(make_type(inherits, state)) + + if inherits not in state.classes: + break # Parent unknown. + inode = state.classes[inherits].inherits if inode: inherits = inode.strip()