diff options
Diffstat (limited to 'doc/tools/make_rst.py')
-rwxr-xr-x | doc/tools/make_rst.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 9e18866ca3..365beb434b 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -438,7 +438,7 @@ def main(): # type: () -> None for path in args.path: # Cut off trailing slashes so os.path.basename doesn't choke. - if path.endswith(os.sep): + if path.endswith("/") or path.endswith("\\"): path = path[:-1] if os.path.basename(path) == "modules": @@ -536,19 +536,19 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S # Inheritance tree # Ascendants if class_def.inherits: - inh = class_def.inherits.strip() + inherits = class_def.inherits.strip() f.write("**" + translate("Inherits:") + "** ") first = True - while inh in state.classes: + while inherits in state.classes: if not first: f.write(" **<** ") else: first = False - f.write(make_type(inh, state)) - inode = state.classes[inh].inherits + f.write(make_type(inherits, state)) + inode = state.classes[inherits].inherits if inode: - inh = inode.strip() + inherits = inode.strip() else: break f.write("\n\n") |