[New-bugs-announce] [issue38584] argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help
Lucas Cimon
report at bugs.python.org
Thu Oct 24 10:40:54 EDT 2019
New submission from Lucas Cimon <lucas.cimon at gmail.com>:
The test I am going to add to test_argparse.py:
def test_whitespace_help(self):
parser = self._get_parser()
parser.add_argument(
'--foo2', action='store_true', help=' ')
parser.add_argument(
'bar2', type=float, help=' ')
parser.format_help() # raises an IndexError
----------
components: Library (Lib)
messages: 355336
nosy: Lucas Cimon
priority: normal
severity: normal
status: open
title: argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38584>
_______________________________________
More information about the New-bugs-announce
mailing list