summaryrefslogtreecommitdiff
path: root/examples/tab_autocompletion.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-07-18 16:08:32 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-07-18 16:08:32 -0400
commit858476599f1d8ac9642c36f0a573cbd596e47a67 (patch)
tree266a272ce3a0df475372e9cb824cb7cff2ef096e /examples/tab_autocompletion.py
parent8e656392c996e11642edbc5b4c6f96e4e614efeb (diff)
downloadcmd2-git-858476599f1d8ac9642c36f0a573cbd596e47a67.tar.gz
Renamed ArgParser to Cmd2ArgumentParser to make it clear it's a derived class of argparse.ArgumentParser
when developers read the code in cmd2.py.
Diffstat (limited to 'examples/tab_autocompletion.py')
-rwxr-xr-xexamples/tab_autocompletion.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/tab_autocompletion.py b/examples/tab_autocompletion.py
index 2e611b70..7ab827e5 100755
--- a/examples/tab_autocompletion.py
+++ b/examples/tab_autocompletion.py
@@ -8,7 +8,7 @@ import functools
from typing import List
import cmd2
-from cmd2 import utils, CompletionItem
+from cmd2 import utils, Cmd2ArgumentParser, CompletionItem
actors = ['Mark Hamill', 'Harrison Ford', 'Carrie Fisher', 'Alec Guinness', 'Peter Mayhew',
'Anthony Daniels', 'Adam Driver', 'Daisy Ridley', 'John Boyega', 'Oscar Isaac',
@@ -128,7 +128,7 @@ class TabCompleteExample(cmd2.Cmd):
suggest_description = "Suggest command demonstrates argparse customizations.\n"
suggest_description += "See hybrid_suggest and orig_suggest to compare the help output."
- suggest_parser = cmd2.ArgParser(description=suggest_description)
+ suggest_parser = Cmd2ArgumentParser(description=suggest_description)
suggest_parser.add_argument('-t', '--type', choices=['movie', 'show'], required=True)
suggest_parser.add_argument('-d', '--duration', nargs=(1, 2), action='append',
@@ -204,7 +204,7 @@ class TabCompleteExample(cmd2.Cmd):
'\n '.join(ep_list)))
print()
- video_parser = cmd2.ArgParser(prog='media')
+ video_parser = Cmd2ArgumentParser(prog='media')
video_types_subparsers = video_parser.add_subparsers(title='Media Types', dest='type')