From 858476599f1d8ac9642c36f0a573cbd596e47a67 Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Thu, 18 Jul 2019 16:08:32 -0400 Subject: Renamed ArgParser to Cmd2ArgumentParser to make it clear it's a derived class of argparse.ArgumentParser when developers read the code in cmd2.py. --- examples/tab_autocompletion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/tab_autocompletion.py') 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') -- cgit v1.2.1