Compare commits

..

No commits in common. "be637e4e310dcbba32f1792682393fdb1afdf630" and "6f2f4793640ef5dabf45780ad02100fd619cca18" have entirely different histories.

4 changed files with 6 additions and 14 deletions

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "tiramisu"
version = "5.2.0a14"
version = "5.2.0a13"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "an options controller tool"

View file

@ -1 +1 @@
__version__ = "5.2.0a14"
__version__ = "5.2.0a13"

View file

@ -518,7 +518,7 @@ class _TiramisuOptionOptionDescription:
and self._subconfig.option.impl_is_dynoptiondescription()
)
@option_type(["option", "leadership", "allow_dynoption"])
@option_type(["option", "leadership"])
def leader(self):
"""Get the leader option for a leadership or a follower option"""
option = self._subconfig.option
@ -640,7 +640,7 @@ class _TiramisuOptionOption(_TiramisuOptionOptionDescription):
return self._subconfig.index
return TiramisuOption(self._path, index, self._config_bag)
@option_type(["symlink", "optiondescription", "allow_dynoption"])
@option_type(["symlink", "optiondescription"])
def option(self, *args, **kwargs):
"""For OptionDescription get sub option, for symlinkoption get the linked option"""
if self._subconfig.option.impl_is_optiondescription():
@ -1047,15 +1047,13 @@ class TiramisuOptionValue(CommonTiramisuOption, _TiramisuODGet):
return False
return True
@option_type(["choice", "with_index", "allow_dynoption"])
@option_type(["choice", "with_index"])
def list(
self,
*,
uncalculated: bool = False,
):
"""All values available for a ChoiceOption"""
if self._subconfig.is_dynamic_without_identifiers and not uncalculated:
raise AttributeOptionError(self._subconfig.path, "option-dynamic")
return self._subconfig.option.impl_get_values(
self._subconfig,
uncalculated,
@ -1217,7 +1215,7 @@ class TiramisuOption(
self._set_subconfig()
return self._subconfig.option.impl_get_group_type()
@option_type(["optiondescription", "validate_properties", "allow_dynoption"])
@option_type(["optiondescription", "validate_properties"])
def list(
self,
*,
@ -1227,8 +1225,6 @@ class TiramisuOption(
):
"""List options inside an option description (by default list only option)"""
self._set_subconfig()
if self._subconfig.is_dynamic_without_identifiers and not uncalculated:
raise AttributeOptionError(self._subconfig.path, "option-dynamic")
return self._list(
self._subconfig,
validate_properties,

View file

@ -426,8 +426,6 @@ class SubConfig:
child,
None,
validate_properties,
allow_dynoption=uncalculated,
check_dynamic_without_identifiers=not uncalculated,
)
except PropertiesOptionError as err:
if err.proptype in (["mandatory"], ["empty"]):
@ -796,8 +794,6 @@ class _Config(CCache):
name=name,
identifier=identifier,
true_path=true_path_,
allow_dynoption=allow_dynoption,
check_dynamic_without_identifiers=not allow_dynoption,
)
return subconfig