Help text improvements: group_tree_spacers, strict_usage_column_width #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added new configurable options:
group_tree_spacers
: Configure the characters that are used whenshow_group_tree
is Truestrict_usage_column_width
: Control line wrapping for the usage column in help textRemoved the
min_usage_column_width
config option, which was poorly conceived and defined, and was part of a buggy implementation of help text formatting that resulted in different usage column widths depending on nested group level whenshow_group_tree
is True.Now,
usage_column_width
is treated as a strict value that is not modified. Commands with deeply nested ParamGroups that useshow_group_tree=True
may benefit from increasing theusage_column_width
value from its default.The relatively internal
format_help_entry
function was changed, along with some relatedParamHelpFormatter
methods. Thetw_offset
parameter was removed (related to the removal of themin_usage_column_width
config option), andcont_indent
was renamed tousage_cont_indent
for clarification. Other changes were made to the way the code related toformat_help_entry
is implemented to make it slightly easier to read/follow.