Browse Source

Fix minor code style issues in the RST generator

Yuri Sizov 4 years ago
parent
commit
1352a087b3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      doc/tools/makerst.py

+ 2 - 1
doc/tools/makerst.py

@@ -479,7 +479,7 @@ def make_rst_class(class_def, state, dry_run, output_dir):  # type: (ClassDef, S
         format_table(f, ml)
         format_table(f, ml)
 
 
     # Theme properties
     # Theme properties
-    if class_def.theme_items is not None and len(class_def.theme_items) > 0:
+    if len(class_def.theme_items) > 0:
         f.write(make_heading("Theme Properties", "-"))
         f.write(make_heading("Theme Properties", "-"))
         pl = []
         pl = []
         for theme_item_def in class_def.theme_items.values():
         for theme_item_def in class_def.theme_items.values():
@@ -601,6 +601,7 @@ def make_rst_class(class_def, state, dry_run, output_dir):  # type: (ClassDef, S
 
 
                 index += 1
                 index += 1
 
 
+    # Theme property descriptions
     if len(class_def.theme_items) > 0:
     if len(class_def.theme_items) > 0:
         f.write(make_heading("Theme Property Descriptions", "-"))
         f.write(make_heading("Theme Property Descriptions", "-"))
         index = 0
         index = 0