support optional to condition to *list
This commit is contained in:
@ -190,6 +190,9 @@ class ConditionAnnotator(TargetAnnotator, ParamAnnotator, Walk):
|
||||
listvars,
|
||||
fills,
|
||||
)
|
||||
elif not target.optional:
|
||||
msg = f'cannot found target "{target.type}" "{target.name}"'
|
||||
raise DictConsistencyError(_(msg), 2, target.xmlfiles)
|
||||
remove_targets.append(target_idx)
|
||||
remove_targets.sort(reverse=True)
|
||||
for target_idx in remove_targets:
|
||||
|
@ -74,7 +74,7 @@ class TargetAnnotator:
|
||||
raise err
|
||||
# for optional variable
|
||||
if not target.optional:
|
||||
msg = f'cannot found target "{target.name}"'
|
||||
msg = f'cannot found target "{target.type}" "{target.name}"'
|
||||
raise DictConsistencyError(_(msg), 12, target.xmlfiles) from err
|
||||
remove_targets.append(index)
|
||||
remove_targets.sort(reverse=True)
|
||||
|
Reference in New Issue
Block a user