bump: version 1.2.0a68 → 1.2.0a69
This commit is contained in:
parent
29697ec122
commit
0ba63e1e12
8 changed files with 46 additions and 7 deletions
|
|
@ -1,3 +1,9 @@
|
|||
## 1.2.0a69 (2026-03-13)
|
||||
|
||||
### Fix
|
||||
|
||||
- do not update name
|
||||
|
||||
## 1.2.0a68 (2026-03-09)
|
||||
|
||||
### Fix
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "rougail"
|
||||
version = "1.2.0a68"
|
||||
version = "1.2.0a69"
|
||||
|
||||
[tool.commitizen]
|
||||
name = "cz_conventional_commits"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
|||
|
||||
[project]
|
||||
name = "rougail-base"
|
||||
version = "1.2.0a68"
|
||||
version = "1.2.0a69"
|
||||
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.0a68"
|
||||
version = "1.2.0a69"
|
||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||
readme = "README.md"
|
||||
description = "A consistency handling system that was initially designed in the configuration management"
|
||||
|
|
@ -27,7 +27,7 @@ classifiers = [
|
|||
dependencies = [
|
||||
"ruamel.yaml ~= 0.18.6",
|
||||
"pydantic ~= 2.9.2",
|
||||
"rougail-base == 1.2.0a68",
|
||||
"rougail-base == 1.2.0a69",
|
||||
]
|
||||
|
||||
[tool.flit.sdist]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "1.2.0a68"
|
||||
__version__ = "1.2.0a69"
|
||||
|
|
|
|||
|
|
@ -234,6 +234,16 @@ class RConfigLeadership:
|
|||
def __repr__(self):
|
||||
return dict(zip(self.leader, self.followers))
|
||||
|
||||
def set_follower(self, key, idx, value):
|
||||
self.config.property.read_write()
|
||||
self.option.option(key, idx).value.set(value)
|
||||
self.config.property.read_only()
|
||||
|
||||
def reset(self):
|
||||
self.config.property.read_write()
|
||||
names = self.option.option("names").value.reset()
|
||||
self.config.property.read_only()
|
||||
|
||||
|
||||
class StaticRougailConvert(RougailConvert):
|
||||
def __init__(
|
||||
|
|
|
|||
|
|
@ -269,6 +269,8 @@ class UserData:
|
|||
if len_leader:
|
||||
for idx in range(len_leader - 1, -1, -1):
|
||||
option.value.pop(idx)
|
||||
if value is undefined:
|
||||
continue
|
||||
try:
|
||||
self.set_value(option, value, options, index)
|
||||
value_is_set = True
|
||||
|
|
@ -417,6 +419,8 @@ class UserData:
|
|||
index_ = index
|
||||
else:
|
||||
index_ = None
|
||||
if value is undefined:
|
||||
continue
|
||||
self.set_value(option, value, options.get("options", {}), index_)
|
||||
except PropertiesOptionError as err:
|
||||
if err.code == "property-error":
|
||||
|
|
@ -561,6 +565,14 @@ class UserData:
|
|||
if index is not None:
|
||||
option = option.index(index)
|
||||
add_validation = False
|
||||
if isinstance(value, list) and undefined in value:
|
||||
val = []
|
||||
for v in value:
|
||||
if v is undefined:
|
||||
val.append(None)
|
||||
else:
|
||||
val.append(v)
|
||||
value = val
|
||||
option.value.set(value)
|
||||
if add_validation:
|
||||
option.property.add("validator")
|
||||
|
|
@ -635,12 +647,19 @@ def _populate_mandatory(option, errors: list) -> None:
|
|||
try:
|
||||
option.value.get()
|
||||
except PropertiesOptionError as err:
|
||||
index = err.subconfig.index
|
||||
if "empty" in err.proptype:
|
||||
msg = _("null is not a valid value for a multi")
|
||||
elif "mandatory" in err.proptype:
|
||||
msg = _("mandatory variable but has no value")
|
||||
if index is None:
|
||||
msg = _("mandatory variable but has no value")
|
||||
else:
|
||||
msg = _('mandatory variable at index "{0}" but has no value').format(index)
|
||||
else:
|
||||
msg = _("mandatory variable but is inaccessible and has no value or has null in value")
|
||||
if index is None:
|
||||
msg = _("mandatory variable but is inaccessible and has no value or has null in value")
|
||||
else:
|
||||
msg = _('mandatory variable at index "{0}" but is inaccessible and has no value or has null in value').format(index)
|
||||
else:
|
||||
proptype = option.value.mandatory(return_type=True)
|
||||
if proptype == "empty":
|
||||
|
|
|
|||
|
|
@ -135,3 +135,7 @@ def test_type_error_version():
|
|||
with raises(DictConsistencyError) as err:
|
||||
type_variable("error_version")
|
||||
assert err.errno == 27
|
||||
|
||||
|
||||
def test_type_family_name_description():
|
||||
type_variable("family_name_description")
|
||||
|
|
|
|||
Loading…
Reference in a new issue