enhancement(src/rougail/annotator/variable.py) add variable name when test nil value

This commit is contained in:
egarette@silique.fr 2023-07-28 08:49:35 +02:00
parent df7f33e786
commit 61569f3772

View file

@ -164,7 +164,7 @@ class Annotator(Walk): # pylint: disable=R0903
if hasattr(variable, 'value'):
for idx, value in enumerate(variable.value):
if not hasattr(value, 'name') and not hasattr(value, 'type'):
msg = 'value without value, if you want the value None, set value type to nil'
msg = f'variable "{variable.name}" has a value without text, if you want the value None, set value type to nil'
raise DictConsistencyError(msg, 95, value.xmlfiles)
if not hasattr(value, 'type'):
value.type = variable.type