From 1c1bb49cb8c722482986c4ace96dc914cbb498a5 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 18 Nov 2021 17:06:00 -0800 Subject: [PATCH] Add ----- between epilogues. --- voussoirkit/betterhelp.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/voussoirkit/betterhelp.py b/voussoirkit/betterhelp.py index 2469715..73849e8 100644 --- a/voussoirkit/betterhelp.py +++ b/voussoirkit/betterhelp.py @@ -113,8 +113,12 @@ def print_helptext(text) -> None: Print the given text to stderr, along with any epilogues added by other modules. ''' - fulltext = [text.strip()] + sorted(epi.strip() for epi in HELPTEXT_EPILOGUES) - fulltext = '\n\n'.join(fulltext) + fulltext = [] + fulltext.append(text.strip()) + fulltext.extend(sorted(epi.strip() for epi in HELPTEXT_EPILOGUES)) + separator = '\n' + ('-'*80) + '\n' + fulltext = separator.join(fulltext) + # Ensure one blank line above helptext. pipeable.stderr() pipeable.stderr(fulltext)