From 10704a06b2da6a29ffd04fae15164a2d0ea83269 Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Tue, 25 Sep 2018 17:34:16 -0400 Subject: Finished macro commands. Still needs testing. --- cmd2/parsing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmd2/parsing.py') diff --git a/cmd2/parsing.py b/cmd2/parsing.py index 7a2af64b..498834cf 100644 --- a/cmd2/parsing.py +++ b/cmd2/parsing.py @@ -25,7 +25,7 @@ digit_pattern = re.compile(r'\d+') @attr.s(frozen=True) -class MacroArgInfo: +class MacroArg: """ Information used to replace or unescape arguments in a macro value when the macro is resolved Normal argument syntax : {5} @@ -51,11 +51,11 @@ class Macro: # The string the macro resolves to value = attr.ib(validator=attr.validators.instance_of(str), type=str) - # The minimum number of args the user has to pass to this macro - min_arg_count = attr.ib(validator=attr.validators.instance_of(int), type=int) + # The required number of args the user has to pass to this macro + required_arg_count = attr.ib(validator=attr.validators.instance_of(int), type=int) # Used to fill in argument placeholders in the macro - arg_info_list = attr.ib(factory=list, validator=attr.validators.instance_of(list), type=List[MacroArgInfo]) + arg_list = attr.ib(factory=list, validator=attr.validators.instance_of(list), type=List[MacroArg]) @attr.s(frozen=True) -- cgit v1.2.1