1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-11-09 23:53:16 +01:00

Fix rendering help output by adding the complete docstring of the commands

This commit is contained in:
2025-04-03 14:18:13 +02:00
parent e9b65037ef
commit 7a4cf1a8df
3 changed files with 20 additions and 9 deletions

View File

@@ -126,13 +126,14 @@ class Command:
if not help_lines:
return ""
# skip the first line that contains help text
help_lines.pop(0)
# remove any leading empty lines
while help_lines and not help_lines[0]:
if getattr(self.main_command, "argparse_manpage", False):
# skip the first line that contains help text
help_lines.pop(0)
# remove any leading empty lines
while help_lines and not help_lines[0]:
help_lines.pop(0)
result = "\n".join(help_lines)
result = textwrap.dedent(result)
return result