File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 2.1.1 (TBD, 2021)
2+ * Bug Fixes
3+ * Fixed handling of argparse's default options group name which was changed in Python 3.10
4+
15## 2.1.0 (June 14, 2021)
26* Enhancements
37 * Converted persistent history files from pickle to compressed JSON
Original file line number Diff line number Diff line change @@ -975,7 +975,12 @@ def format_help(self) -> str:
975975
976976 # positionals, optionals and user-defined groups
977977 for action_group in self ._action_groups :
978- if action_group .title == 'optional arguments' :
978+ if sys .version_info >= (3 , 10 ):
979+ default_options_group = action_group .title == 'options'
980+ else :
981+ default_options_group = action_group .title == 'optional arguments'
982+
983+ if default_options_group :
979984 # check if the arguments are required, group accordingly
980985 req_args = []
981986 opt_args = []
@@ -992,7 +997,7 @@ def format_help(self) -> str:
992997 formatter .end_section ()
993998
994999 # now display truly optional arguments
995- formatter .start_section (action_group . title )
1000+ formatter .start_section ('optional arguments' )
9961001 formatter .add_text (action_group .description )
9971002 formatter .add_arguments (opt_args )
9981003 formatter .end_section ()
Original file line number Diff line number Diff line change @@ -131,8 +131,9 @@ def __init__(
131131 validation using str_to_bool(). The val_type function should raise an exception if it fails.
132132 This exception will be caught and printed by Cmd.do_set().
133133 :param description: string describing this setting
134- :param settable_object: Object to configure with the set command
135- :param settable_attrib_name: Attribute name to be modified. Defaults to `name` if not specified.
134+ :param settable_object: object to which the instance attribute belongs (e.g. self)
135+ :param settable_attrib_name: name which displays to the user in the output of the set command.
136+ Defaults to `name` if not specified.
136137 :param onchange_cb: optional function or method to call when the value of this settable is altered
137138 by the set command. (e.g. onchange_cb=self.debug_changed)
138139
Original file line number Diff line number Diff line change 5252
5353# General information about the project.
5454project = 'cmd2'
55- copyright = '2010-2020 , cmd2 contributors'
55+ copyright = '2010-2021 , cmd2 contributors'
5656author = 'cmd2 contributors'
5757
5858# The version info for the project you're documenting, acts as replacement for
You can’t perform that action at this time.
0 commit comments