In make_rst.py, include the parent class in 'Inherits:' even if it is not known.

This commit is contained in:
Lukas Tenbrink 2024-09-22 20:56:20 +02:00 committed by GitHub
parent e4e024ab88
commit 50ad99bdc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -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()