Skip to content

Fix tuple metavar crash in Cmd2HelpFormatter and ArgparseCompleter #975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 13, 2020

Conversation

kmvanbrunt
Copy link
Member

Fixes #974

@kmvanbrunt kmvanbrunt added the bug label Aug 12, 2020
@kmvanbrunt kmvanbrunt self-assigned this Aug 12, 2020
Copy link
Member

@tleonhardt tleonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a unit test for the case where metavar is a tuple and nargs is an integer > 1. Other than that, this looks good.

@codecov
Copy link

codecov bot commented Aug 12, 2020

Codecov Report

Merging #975 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #975      +/-   ##
==========================================
+ Coverage   97.80%   97.82%   +0.02%     
==========================================
  Files          22       22              
  Lines        4509     4516       +7     
==========================================
+ Hits         4410     4418       +8     
+ Misses         99       98       -1     
Impacted Files Coverage Δ
cmd2/argparse_completer.py 100.00% <100.00%> (ø)
cmd2/argparse_custom.py 94.49% <100.00%> (+0.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 133e71a...ac26cae. Read the comment docs.

tleonhardt
tleonhardt previously approved these changes Aug 13, 2020
tleonhardt
tleonhardt previously approved these changes Aug 13, 2020
@kmvanbrunt kmvanbrunt changed the title Fix tuple metavar crash in Cmd2HelpFormatter Fix tuple metavar crash in Cmd2HelpFormatter and ArgparseCompleter Aug 13, 2020
Copy link
Member

@tleonhardt tleonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anselor
Copy link
Contributor

anselor commented Aug 13, 2020

Looks good.

@kmvanbrunt kmvanbrunt merged commit b26974e into master Aug 13, 2020
@kmvanbrunt kmvanbrunt deleted the help_format_fix branch August 13, 2020 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in Cmd2HelpFormatter and ArgparseCompleter when metavar is a tuple
3 participants