mandatory_warnings => mandatory
This commit is contained in:
@ -433,6 +433,23 @@ class _TiramisuOptionValueOption:
|
||||
self._test_slave_index()
|
||||
self._subconfig.delattr(self._option_bag)
|
||||
|
||||
def default(self):
|
||||
"""Get default value (default of option or calculated value)"""
|
||||
option = self._option_bag.option
|
||||
values = self._option_bag.config_bag.context.cfgimpl_get_values()
|
||||
if option.impl_is_master_slaves('slave') and self._option_bag.index is None:
|
||||
value = []
|
||||
length = self._subconfig.cfgimpl_get_length_slave(self._option_bag)
|
||||
for idx in range(length):
|
||||
soption_bag = OptionBag()
|
||||
soption_bag.set_option(option,
|
||||
self._option_bag.path,
|
||||
idx,
|
||||
self._option_bag.config_bag)
|
||||
value.append(values.getdefaultvalue(soption_bag))
|
||||
else:
|
||||
return values.getdefaultvalue(self._option_bag)
|
||||
|
||||
|
||||
class _TiramisuOptionValueMaster:
|
||||
def pop(self, index):
|
||||
@ -755,7 +772,7 @@ class TiramisuContextInformation(TiramisuContext):
|
||||
|
||||
class TiramisuContextValue(TiramisuContext):
|
||||
"""Manage config value"""
|
||||
def mandatory_warnings(self):
|
||||
def mandatory(self):
|
||||
"""Return path of options with mandatory property without any value"""
|
||||
return self._config_bag.context.cfgimpl_get_values().mandatory_warnings(self._config_bag)
|
||||
|
||||
|
Reference in New Issue
Block a user