summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-08-13 18:04:05 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-08-13 18:04:05 -0400
commit125eba80917e2a5b960efce5506c5c92f7893e7d (patch)
tree475941135c392b0628b9781942ad81436ff03e7d
parent344205342b28f97206a9547d1a8b32808c49878e (diff)
downloadcmd2-git-125eba80917e2a5b960efce5506c5c92f7893e7d.tar.gz
Renamed some variables
-rw-r--r--cmd2/argparse_completer.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py
index c472fbc7..cfaae7df 100644
--- a/cmd2/argparse_completer.py
+++ b/cmd2/argparse_completer.py
@@ -147,7 +147,7 @@ class AutoCompleter(object):
matched_flags = []
# Keeps track of arguments we've seen and any tokens they consumed
- consumed_arg_values = dict() # dict(action -> [values, ...])
+ consumed_arg_values = dict() # dict(action -> tokens)
def consume_argument(arg_state: AutoCompleter._ArgumentState) -> None:
"""Consuming token as an argument"""
@@ -445,8 +445,8 @@ class AutoCompleter(object):
# Convert consumed_arg_values into an argparse Namespace
parsed_args = argparse.Namespace()
- for key, val in consumed_arg_values.items():
- setattr(parsed_args, key.dest, val)
+ for action, tokens in consumed_arg_values.items():
+ setattr(parsed_args, action.dest, tokens)
# Check if the argument uses a specific tab completion function to provide its choices
if isinstance(arg_choices, ChoicesCallable) and arg_choices.is_completer: