mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
gh-133300: argparse: make suggest_on_error a keyword-only parameter (#133302)
This commit is contained in:
parent
f2379535fe
commit
e6c518d2eb
3 changed files with 4 additions and 2 deletions
|
|
@ -74,7 +74,7 @@ ArgumentParser objects
|
|||
prefix_chars='-', fromfile_prefix_chars=None, \
|
||||
argument_default=None, conflict_handler='error', \
|
||||
add_help=True, allow_abbrev=True, exit_on_error=True, \
|
||||
suggest_on_error=False, color=False)
|
||||
*, suggest_on_error=False, color=False)
|
||||
|
||||
Create a new :class:`ArgumentParser` object. All parameters should be passed
|
||||
as keyword arguments. Each parameter has its own more detailed description
|
||||
|
|
|
|||
|
|
@ -1886,8 +1886,8 @@ def __init__(self,
|
|||
add_help=True,
|
||||
allow_abbrev=True,
|
||||
exit_on_error=True,
|
||||
suggest_on_error=False,
|
||||
*,
|
||||
suggest_on_error=False,
|
||||
color=False,
|
||||
):
|
||||
superinit = super(ArgumentParser, self).__init__
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
Make :class:`argparse.ArgumentParser`'s ``suggest_on_error`` a keyword-only
|
||||
parameter. Patch by Hugo van Kemenade.
|
||||
Loading…
Add table
Add a link
Reference in a new issue