mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-140448: Default suggest_on_error to True in argparse.ArgumentParser (#140450)
This commit is contained in:
parent
d51be28876
commit
d2f3cfd384
6 changed files with 36 additions and 26 deletions
|
|
@ -1857,7 +1857,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
|
|||
- exit_on_error -- Determines whether or not ArgumentParser exits with
|
||||
error info when an error occurs
|
||||
- suggest_on_error - Enables suggestions for mistyped argument choices
|
||||
and subparser names (default: ``False``)
|
||||
and subparser names (default: ``True``)
|
||||
- color - Allow color output in help messages (default: ``False``)
|
||||
"""
|
||||
|
||||
|
|
@ -1876,7 +1876,7 @@ def __init__(self,
|
|||
allow_abbrev=True,
|
||||
exit_on_error=True,
|
||||
*,
|
||||
suggest_on_error=False,
|
||||
suggest_on_error=True,
|
||||
color=True,
|
||||
):
|
||||
superinit = super(ArgumentParser, self).__init__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue