Skip to content

Conversation

@kmvanbrunt
Copy link
Member

  • AutoCompleter now handles argparse's mutually exclusive groups. It will not tab complete flag names or positionals for already completed groups. It also will print an error if you try tab completing a flag's value if the flag belongs to a completed group.
  • AutoCompleter now uses the passed-in parser's help formatter to generate hint text. This gives help and hint text for an argument consistent formatting.

Fixes #777

@kmvanbrunt kmvanbrunt requested a review from kotfu as a code owner October 1, 2019 02:52
@codecov
Copy link

codecov bot commented Oct 1, 2019

Codecov Report

Merging #784 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #784      +/-   ##
==========================================
+ Coverage   97.34%   97.38%   +0.03%     
==========================================
  Files          13       13              
  Lines        3469     3474       +5     
==========================================
+ Hits         3377     3383       +6     
+ Misses         92       91       -1
Impacted Files Coverage Δ
cmd2/cmd2.py 96.77% <ø> (ø) ⬆️
cmd2/argparse_completer.py 100% <100%> (ø) ⬆️
cmd2/utils.py 98.2% <0%> (+0.35%) ⬆️

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 b3408bc...2ac65e0. Read the comment docs.

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.

I haven't had a chance to manually test any of the changes, but everything here looks OK

@kmvanbrunt kmvanbrunt merged commit 07ddcb4 into master Oct 1, 2019
@kmvanbrunt kmvanbrunt deleted the mutually_exclusive_groups branch October 1, 2019 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle mutually exclusive group in AutoCompleter

3 participants