Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion knack/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def _build_long_summary(item):
lines.append(str(item.deprecate_info.message))
if item.preview_info:
lines.append(str(item.preview_info.message))
return ' '.join(lines)
return '\n'.join(lines)

indent += 1
long_sum = _build_long_summary(help_file)
Expand Down
11 changes: 6 additions & 5 deletions tests/test_deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ def test_deprecate_command_help_hidden(self):
expected = """
Command
{} cmd3 : Short summary here.
Long summary here. Still long summary. This command has been deprecated and will be
removed in a future release. Use 'alt-cmd3' instead.
Long summary here. Still long summary.
This command has been deprecated and will be removed in a future release. Use 'alt-
cmd3' instead.

Arguments
-b [Required] : Allowed values: a, b, c.
Expand Down Expand Up @@ -245,9 +246,9 @@ def test_deprecate_command_implicitly(self):
expected = """
Command
{} group1 cmd1 : Short summary here.
Long summary here. Still long summary. This command is implicitly deprecated because
command group 'group1' is deprecated and will be removed in a future release. Use 'alt-
group1' instead.
Long summary here. Still long summary.
This command is implicitly deprecated because command group 'group1' is deprecated and
will be removed in a future release. Use 'alt-group1' instead.
""".format(self.cli_ctx.name)
self.assertIn(expected, actual)

Expand Down
5 changes: 3 additions & 2 deletions tests/test_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def test_preview_command_implicitly(self):
expected = """
Command
{} group1 cmd1 : Short summary here.
Long summary here. Still long summary. Command group 'group1' is in preview. It may be
changed/removed in a future release.
Long summary here. Still long summary.
Command group 'group1' is in preview. It may be changed/removed in a future
release.
""".format(self.cli_ctx.name)
self.assertIn(expected, actual)

Expand Down