Skip to content

Tweaked complete function to handle cases where a flag appears before… #299

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 3 commits into from
Mar 9, 2018

Conversation

kmvanbrunt
Copy link
Member

… subcommand name

@kmvanbrunt kmvanbrunt requested a review from tleonhardt March 9, 2018 21:48
@codecov
Copy link

codecov bot commented Mar 9, 2018

Codecov Report

Merging #299 into master will decrease coverage by 0.03%.
The diff coverage is 96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #299      +/-   ##
==========================================
- Coverage   89.89%   89.86%   -0.04%     
==========================================
  Files           1        1              
  Lines        1514     1519       +5     
==========================================
+ Hits         1361     1365       +4     
- Misses        153      154       +1
Impacted Files Coverage Δ
cmd2.py 89.86% <96%> (-0.04%) ⬇️

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 df2e4b7...cf23503. Read the comment docs.

@@ -193,7 +193,7 @@ def flag_based_complete(text, line, begidx, endidx, flag_dict, default_completer
return []

completions = []
flag_processed = False
flag_present = False
Copy link
Member

Choose a reason for hiding this comment

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

As far as I can tell, these changes look good. You might consider modifying either the tab_completion.py or subcommands.py example to illustrate the case where this PR would matter.

@tleonhardt tleonhardt merged commit f53005f into master Mar 9, 2018
@tleonhardt tleonhardt deleted the subcomplete branch March 9, 2018 22:56
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.

2 participants