summaryrefslogtreecommitdiff
path: root/examples/arg_decorators.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-08-13 14:19:05 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-08-13 14:20:31 -0400
commite6da8596c433f46bc337c7e8a14c7de1b0310e4c (patch)
tree09f5a3225376e26dcb03419d6243c8fc52433b07 /examples/arg_decorators.py
parent5dd2d03ef35a3d33ff53d82c8039d68e263246ee (diff)
downloadcmd2-git-e6da8596c433f46bc337c7e8a14c7de1b0310e4c.tar.gz
Replaced choices_function / choices_method with choices_provider.
Replaced completer_function / completer_method with completer. ArgparseCompleter now always passes cmd2.Cmd or CommandSet instance as the self argument to choices_provider and completer functions. Moved basic_complete from utils into cmd2.Cmd class. Moved CompletionError to exceptions.py
Diffstat (limited to 'examples/arg_decorators.py')
-rwxr-xr-xexamples/arg_decorators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/arg_decorators.py b/examples/arg_decorators.py
index a085341d..9ffcd8ce 100755
--- a/examples/arg_decorators.py
+++ b/examples/arg_decorators.py
@@ -18,7 +18,7 @@ class ArgparsingApp(cmd2.Cmd):
help='add comma for thousands separator')
fsize_parser.add_argument('-u', '--unit', choices=['MB', 'KB'], help='unit to display size in')
fsize_parser.add_argument('file_path', help='path of file',
- completer_method=cmd2.Cmd.path_complete)
+ completer=cmd2.Cmd.path_complete)
@cmd2.with_argparser(fsize_parser)
def do_fsize(self, args: argparse.Namespace) -> None: