From 9af355fcc173a1e9e47a144ed4a2215993b2787c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Jan 2025 13:39:28 +1100 Subject: [PATCH] check_spelling: correct help text formatting, correct "--check" text --- tools/check_source/check_spelling.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/check_source/check_spelling.py b/tools/check_source/check_spelling.py index 7896216a413..3abed59d247 100755 --- a/tools/check_source/check_spelling.py +++ b/tools/check_source/check_spelling.py @@ -712,9 +712,10 @@ def spell_check_file_with_cache_support( def argparse_create() -> argparse.ArgumentParser: - # When --help or no args are given, print this help - description = __doc__ - parser = argparse.ArgumentParser(description=description) + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawTextHelpFormatter, + ) parser.add_argument( "--match", @@ -750,10 +751,10 @@ def argparse_create() -> argparse.ArgumentParser: required=False, metavar='CHECK_TYPE', help=( - 'Text to extract for checking.\n' + 'The check to perform.\n' '\n' - '- ``COMMENTS`` extracts comments from source code.\n' - '- ``STRINGS`` extracts text.' + '- ``SPELLING`` check spelling.\n' + '- ``DUPLICATES`` report repeated words.' ), )