From 3fad16d0acb1af93d9d7e748b20dc1f254707162 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 18 Oct 2025 06:31:40 +0200 Subject: [PATCH] fix: accept allow_dynoption --- tiramisu/api.py | 1 + tiramisu/config.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tiramisu/api.py b/tiramisu/api.py index 6ce56e5..7717ebe 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -275,6 +275,7 @@ class _TiramisuOptionWalk: validate_properties, uncalculated=uncalculated, with_index=with_index, + check_dynamic_without_identifiers=False, ): options.append( TiramisuOption( diff --git a/tiramisu/config.py b/tiramisu/config.py index 8854955..da4cbb4 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -396,6 +396,7 @@ class SubConfig: *, uncalculated: bool = False, with_index: bool = True, + check_dynamic_without_identifiers: bool = True, ): if self.option.impl_is_leadership() and not uncalculated and with_index: yield from self.get_leadership_children(validate_properties) @@ -426,8 +427,7 @@ class SubConfig: child, None, validate_properties, - allow_dynoption=uncalculated, - check_dynamic_without_identifiers=not uncalculated, + check_dynamic_without_identifiers=check_dynamic_without_identifiers, ) except PropertiesOptionError as err: if err.proptype in (["mandatory"], ["empty"]): @@ -452,7 +452,6 @@ class SubConfig: validate_properties: bool, *, properties=undefined, - allow_dynoption: bool = False, identifier: Optional[str] = None, name: Optional[str] = None, check_index: bool = True, @@ -743,9 +742,11 @@ class _Config(CCache): len_path = len(paths) - 1 for idx, name in enumerate(paths): if idx != len_path: + check_dynamic_without_identifiers=True index_ = None true_path_ = None else: + check_dynamic_without_identifiers=not allow_dynoption index_ = index true_path_ = true_path @@ -796,8 +797,7 @@ class _Config(CCache): name=name, identifier=identifier, true_path=true_path_, - allow_dynoption=allow_dynoption, - check_dynamic_without_identifiers=not allow_dynoption, + check_dynamic_without_identifiers=check_dynamic_without_identifiers, ) return subconfig