|
90 | 90 | NO_RESIZE_LIST = [ |
91 | 91 | "Variablelist", |
92 | 92 | "ItemizedList", |
| 93 | + "SimpleList" |
93 | 94 | "Caution", |
94 | 95 | "XMLWarning", |
95 | 96 | "ProgramListing", |
@@ -2395,15 +2396,10 @@ def to_rst(self, indent="", max_length=100, links=None, base_url=None, fcache=No |
2395 | 2396 | items.append(entry_item) |
2396 | 2397 |
|
2397 | 2398 | entry_content = " ".join(items) |
2398 | | - # entry_content = resize_length( |
2399 | | - # entry_content, max_length=max_length, initial_indent=indent, subsequent_indent=" " * 2 |
2400 | | - # ) |
2401 | 2399 |
|
2402 | 2400 | if self.morerows is not None: |
2403 | 2401 | entry_content = f":rspan:`{content}` " + entry_content |
2404 | 2402 |
|
2405 | | - print(entry_content) |
2406 | | - # to be checked - not working |
2407 | 2403 | return entry_content |
2408 | 2404 |
|
2409 | 2405 |
|
@@ -3125,13 +3121,13 @@ def py_signature(self, custom_functions: CustomFunctions, indent="") -> str: |
3125 | 3121 | arg_sig = ", ".join(args) |
3126 | 3122 | return f"{indent}def {self.py_name}({arg_sig}, **kwargs):" |
3127 | 3123 |
|
3128 | | - def custom_notes(self, custom_functions: CustomFunctions = None): |
| 3124 | + def custom_notes(self, custom_functions: CustomFunctions = None, automated_notes: List[str]= None) -> List[str]: |
3129 | 3125 | """Customized notes for the command.""" |
3130 | 3126 | lines = [] |
3131 | 3127 | if custom_functions is not None and ( |
3132 | 3128 | self.py_name in custom_functions.py_names and self.py_name in custom_functions.py_notes |
3133 | 3129 | ): |
3134 | | - if len("\n".join(lines)) < len("\n".join(custom_functions.py_notes[self.py_name])): |
| 3130 | + if len("\n".join(automated_notes)) < len("\n".join(custom_functions.py_notes[self.py_name])): |
3135 | 3131 | lines = custom_functions.py_notes[self.py_name] |
3136 | 3132 | return lines |
3137 | 3133 |
|
@@ -3180,14 +3176,15 @@ def py_docstring( |
3180 | 3176 | and self.py_name in custom_functions.py_returns |
3181 | 3177 | ): |
3182 | 3178 | items += [""] + custom_functions.py_returns[self.py_name] |
3183 | | - custom_notes = self.custom_notes(custom_functions) |
| 3179 | + automated_notes = self.py_notes(self.notes, "Notes") |
| 3180 | + custom_notes = self.custom_notes(custom_functions, automated_notes) |
3184 | 3181 | if not custom_notes: |
3185 | 3182 | if self.other_parameters: |
3186 | 3183 | items += [""] |
3187 | 3184 | items.extend(self.py_notes(self.other_parameters, "Other Parameters")) |
3188 | 3185 | if self.notes: |
3189 | 3186 | items += [""] |
3190 | | - items.extend(self.py_notes(self.notes, "Notes")) |
| 3187 | + items.extend(automated_notes) |
3191 | 3188 | else: |
3192 | 3189 | items.extend(custom_notes) |
3193 | 3190 | if custom_functions and ( |
@@ -3400,7 +3397,7 @@ def py_notes(self, note_elem_list, section_title): |
3400 | 3397 | resized_item = resize_length(item, self._max_length) |
3401 | 3398 | notes = notes.replace(item, resized_item) |
3402 | 3399 | lines.extend(notes.split("\n")) |
3403 | | - |
| 3400 | + |
3404 | 3401 | return lines |
3405 | 3402 |
|
3406 | 3403 | @property |
|
0 commit comments