File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,8 @@ ArgumentParser objects
189189 formatter_class=argparse.HelpFormatter, \
190190 prefix_chars='-', fromfile_prefix_chars=None, \
191191 argument_default=None, conflict_handler='error', \
192- add_help=True, allow_abbrev=True, exit_on_error=True)
192+ add_help=True, allow_abbrev=True, exit_on_error=True,\
193+ suggest_on_error=False)
193194
194195 Create a new :class: `ArgumentParser ` object. All parameters should be passed
195196 as keyword arguments. Each parameter has its own more detailed description
@@ -230,6 +231,10 @@ ArgumentParser objects
230231
231232 * exit_on_error _ - Determines whether or not ArgumentParser exits with
232233 error info when an error occurs. (default: ``True ``)
234+
235+ * suggest_on_error _ - Enables suggestions for mistyped argument choices
236+ and subparser names. (default: ``False ``)
237+
233238
234239 .. versionchanged :: 3.5
235240 *allow_abbrev * parameter was added.
Original file line number Diff line number Diff line change @@ -1715,8 +1715,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
17151715 - allow_abbrev -- Allow long options to be abbreviated unambiguously
17161716 - exit_on_error -- Determines whether or not ArgumentParser exits with
17171717 error info when an error occurs
1718- - suggest_on_error - Enables argument choice and subparser name
1719- suggestions on user typo
1718+ - suggest_on_error - Enables suggestions for mistyped argument choices
1719+ and subparser names. (default: ``False``)
17201720 """
17211721
17221722 def __init__ (self ,
You can’t perform that action at this time.
0 commit comments