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] [project]
name = "tiramisu" name = "tiramisu"
version = "5.2.0a14" version = "5.2.0a13"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}] authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md" readme = "README.md"
description = "an options controller tool" 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() and self._subconfig.option.impl_is_dynoptiondescription()
) )
@option_type(["option", "leadership", "allow_dynoption"]) @option_type(["option", "leadership"])
def leader(self): def leader(self):
"""Get the leader option for a leadership or a follower option""" """Get the leader option for a leadership or a follower option"""
option = self._subconfig.option option = self._subconfig.option
@ -640,7 +640,7 @@ class _TiramisuOptionOption(_TiramisuOptionOptionDescription):
return self._subconfig.index return self._subconfig.index
return TiramisuOption(self._path, index, self._config_bag) return TiramisuOption(self._path, index, self._config_bag)
@option_type(["symlink", "optiondescription", "allow_dynoption"]) @option_type(["symlink", "optiondescription"])
def option(self, *args, **kwargs): def option(self, *args, **kwargs):
"""For OptionDescription get sub option, for symlinkoption get the linked option""" """For OptionDescription get sub option, for symlinkoption get the linked option"""
if self._subconfig.option.impl_is_optiondescription(): if self._subconfig.option.impl_is_optiondescription():
@ -1047,15 +1047,13 @@ class TiramisuOptionValue(CommonTiramisuOption, _TiramisuODGet):
return False return False
return True return True
@option_type(["choice", "with_index", "allow_dynoption"]) @option_type(["choice", "with_index"])
def list( def list(
self, self,
*, *,
uncalculated: bool = False, uncalculated: bool = False,
): ):
"""All values available for a ChoiceOption""" """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( return self._subconfig.option.impl_get_values(
self._subconfig, self._subconfig,
uncalculated, uncalculated,
@ -1217,7 +1215,7 @@ class TiramisuOption(
self._set_subconfig() self._set_subconfig()
return self._subconfig.option.impl_get_group_type() return self._subconfig.option.impl_get_group_type()
@option_type(["optiondescription", "validate_properties", "allow_dynoption"]) @option_type(["optiondescription", "validate_properties"])
def list( def list(
self, self,
*, *,
@ -1227,8 +1225,6 @@ class TiramisuOption(
): ):
"""List options inside an option description (by default list only option)""" """List options inside an option description (by default list only option)"""
self._set_subconfig() self._set_subconfig()
if self._subconfig.is_dynamic_without_identifiers and not uncalculated:
raise AttributeOptionError(self._subconfig.path, "option-dynamic")
return self._list( return self._list(
self._subconfig, self._subconfig,
validate_properties, validate_properties,

View file

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