Compare commits

..

No commits in common. "349e30fc100cc892cf549fcce67dea8b729957e8" and "f9c73783c56bf7d9fc053ade61ec319cf34cd4cf" have entirely different histories.

8 changed files with 13 additions and 27 deletions

View file

@ -1,9 +1,3 @@
## 1.2.0a58 (2026-01-16)
### Fix
- secret with follower
## 1.2.0a57 (2026-01-16) ## 1.2.0a57 (2026-01-16)
### Fix ### Fix

View file

@ -1,6 +1,6 @@
[project] [project]
name = "rougail" name = "rougail"
version = "1.2.0a58" version = "1.2.0a57"
[tool.commitizen] [tool.commitizen]
name = "cz_conventional_commits" name = "cz_conventional_commits"

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project] [project]
name = "rougail-base" name = "rougail-base"
version = "1.2.0a58" version = "1.2.0a57"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}] authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md" readme = "README.md"
description = "A consistency handling system that was initially designed in the configuration management" description = "A consistency handling system that was initially designed in the configuration management"

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project] [project]
name = "rougail" name = "rougail"
version = "1.2.0a58" version = "1.2.0a57"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}] authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
description = "A consistency handling system that was initially designed in the configuration management" description = "A consistency handling system that was initially designed in the configuration management"
classifiers = [ classifiers = [
@ -18,7 +18,7 @@ classifiers = [
dependencies = [ dependencies = [
"ruamel.yaml ~= 0.18.6", "ruamel.yaml ~= 0.18.6",
"pydantic ~= 2.9.2", "pydantic ~= 2.9.2",
"rougail-base == 1.2.0a58", "rougail-base == 1.2.0a57",
] ]
[tool.flit.sdist] [tool.flit.sdist]

View file

@ -1 +1 @@
__version__ = "1.2.0a58" __version__ = "1.2.0a57"

View file

@ -242,7 +242,7 @@ class Annotator(Walk): # pylint: disable=R0903
if calculated_variable.multi is None: if calculated_variable.multi is None:
if ( if (
isinstance(calculated_variable.default, VariableCalculation) isinstance(calculated_variable.default, VariableCalculation)
and variable.path == calculated_variable.default.variable and variable.path == calculated_variable.default.path
): ):
msg = _( msg = _(
'the "{0}" default value is a calculation with itself' 'the "{0}" default value is a calculation with itself'

View file

@ -586,6 +586,7 @@ def _rougail_config(
tiram_obj = convert.save() tiram_obj = convert.save()
optiondescription = {} optiondescription = {}
print(tiram_obj)
exec(tiram_obj, {}, optiondescription) # pylint: disable=W0122 exec(tiram_obj, {}, optiondescription) # pylint: disable=W0122
return optiondescription["option_0"], extra_vars return optiondescription["option_0"], extra_vars

View file

@ -266,7 +266,7 @@ class UserData:
for idx in range(len_leader - 1, -1, -1): for idx in range(len_leader - 1, -1, -1):
option.value.pop(idx) option.value.pop(idx)
try: try:
self.set_value(option, value, options, index) self.set_value(option, value, options)
value_is_set = True value_is_set = True
except Exception as err: except Exception as err:
if path != option.path(): if path != option.path():
@ -398,24 +398,19 @@ class UserData:
path, option, self.values[path].get("options", {}), value path, option, self.values[path].get("options", {}), value
) )
if option.isfollower(): if option.isfollower():
if not isinstance(value, tuple):
indexes = range(len(value)) indexes = range(len(value))
else:
indexes = range(len(option.parent().leader().value.get()))
values = value values = value
else: else:
indexes = [None] indexes = [None]
for index in indexes: for index in indexes:
try: try:
if option.isfollower(): if option.isfollower():
if not isinstance(value, tuple):
value = values[index] value = values[index]
if value is undefined or isinstance(value, CancelParam): if value is undefined or isinstance(value, CancelParam):
continue continue
index_ = index option.index(index).value.set(value)
else: else:
index_ = None self.set_value(option, value, options.get("options", {}))
self.set_value(option, value, options.get("options", {}), index_)
except PropertiesOptionError as err: except PropertiesOptionError as err:
if err.code == "property-error": if err.code == "property-error":
properties = display_list( properties = display_list(
@ -542,19 +537,15 @@ class UserData:
continue continue
raise err from err raise err from err
def set_value(self, option, value, options, index): def set_value(self, option, value, options):
is_secret_manager = options.get("secret_manager", False) is_secret_manager = options.get("secret_manager", False)
if is_secret_manager and isinstance(value, tuple): if is_secret_manager and isinstance(value, tuple):
# it's a function # it's a function
params = tuple([ParamValue(val) for val in value[1:]]) params = tuple([ParamValue(val) for val in value[1:]])
if index is not None:
option = option.forcepermissive.index(index)
value = Calculation(value[0], Params(params, kwargs={"option": ParamValue(option)})) value = Calculation(value[0], Params(params, kwargs={"option": ParamValue(option)}))
option = option.forcepermissive option = option.forcepermissive
add_validation = True add_validation = True
else: else:
if index is not None:
option = option.index(index)
add_validation = False add_validation = False
option.value.set(value) option.value.set(value)
if add_validation: if add_validation: