Compare commits
No commits in common. "349e30fc100cc892cf549fcce67dea8b729957e8" and "f9c73783c56bf7d9fc053ade61ec319cf34cd4cf" have entirely different histories.
349e30fc10
...
f9c73783c5
8 changed files with 13 additions and 27 deletions
|
|
@ -1,9 +1,3 @@
|
|||
## 1.2.0a58 (2026-01-16)
|
||||
|
||||
### Fix
|
||||
|
||||
- secret with follower
|
||||
|
||||
## 1.2.0a57 (2026-01-16)
|
||||
|
||||
### Fix
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "rougail"
|
||||
version = "1.2.0a58"
|
||||
version = "1.2.0a57"
|
||||
|
||||
[tool.commitizen]
|
||||
name = "cz_conventional_commits"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
|||
|
||||
[project]
|
||||
name = "rougail-base"
|
||||
version = "1.2.0a58"
|
||||
version = "1.2.0a57"
|
||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||
readme = "README.md"
|
||||
description = "A consistency handling system that was initially designed in the configuration management"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
|||
|
||||
[project]
|
||||
name = "rougail"
|
||||
version = "1.2.0a58"
|
||||
version = "1.2.0a57"
|
||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||
description = "A consistency handling system that was initially designed in the configuration management"
|
||||
classifiers = [
|
||||
|
|
@ -18,7 +18,7 @@ classifiers = [
|
|||
dependencies = [
|
||||
"ruamel.yaml ~= 0.18.6",
|
||||
"pydantic ~= 2.9.2",
|
||||
"rougail-base == 1.2.0a58",
|
||||
"rougail-base == 1.2.0a57",
|
||||
]
|
||||
|
||||
[tool.flit.sdist]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "1.2.0a58"
|
||||
__version__ = "1.2.0a57"
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ class Annotator(Walk): # pylint: disable=R0903
|
|||
if calculated_variable.multi is None:
|
||||
if (
|
||||
isinstance(calculated_variable.default, VariableCalculation)
|
||||
and variable.path == calculated_variable.default.variable
|
||||
and variable.path == calculated_variable.default.path
|
||||
):
|
||||
msg = _(
|
||||
'the "{0}" default value is a calculation with itself'
|
||||
|
|
|
|||
|
|
@ -586,6 +586,7 @@ def _rougail_config(
|
|||
|
||||
tiram_obj = convert.save()
|
||||
optiondescription = {}
|
||||
print(tiram_obj)
|
||||
exec(tiram_obj, {}, optiondescription) # pylint: disable=W0122
|
||||
return optiondescription["option_0"], extra_vars
|
||||
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ class UserData:
|
|||
for idx in range(len_leader - 1, -1, -1):
|
||||
option.value.pop(idx)
|
||||
try:
|
||||
self.set_value(option, value, options, index)
|
||||
self.set_value(option, value, options)
|
||||
value_is_set = True
|
||||
except Exception as err:
|
||||
if path != option.path():
|
||||
|
|
@ -398,24 +398,19 @@ class UserData:
|
|||
path, option, self.values[path].get("options", {}), value
|
||||
)
|
||||
if option.isfollower():
|
||||
if not isinstance(value, tuple):
|
||||
indexes = range(len(value))
|
||||
else:
|
||||
indexes = range(len(option.parent().leader().value.get()))
|
||||
values = value
|
||||
else:
|
||||
indexes = [None]
|
||||
for index in indexes:
|
||||
try:
|
||||
if option.isfollower():
|
||||
if not isinstance(value, tuple):
|
||||
value = values[index]
|
||||
if value is undefined or isinstance(value, CancelParam):
|
||||
continue
|
||||
index_ = index
|
||||
option.index(index).value.set(value)
|
||||
else:
|
||||
index_ = None
|
||||
self.set_value(option, value, options.get("options", {}), index_)
|
||||
self.set_value(option, value, options.get("options", {}))
|
||||
except PropertiesOptionError as err:
|
||||
if err.code == "property-error":
|
||||
properties = display_list(
|
||||
|
|
@ -542,19 +537,15 @@ class UserData:
|
|||
continue
|
||||
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)
|
||||
if is_secret_manager and isinstance(value, tuple):
|
||||
# it's a function
|
||||
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)}))
|
||||
option = option.forcepermissive
|
||||
add_validation = True
|
||||
else:
|
||||
if index is not None:
|
||||
option = option.index(index)
|
||||
add_validation = False
|
||||
option.value.set(value)
|
||||
if add_validation:
|
||||
|
|
|
|||
Loading…
Reference in a new issue