From 153002edd21f3ecf55f30646b3f83425760fff4a Mon Sep 17 00:00:00 2001 From: jacques franc Date: Fri, 19 Dec 2025 10:42:09 +0100 Subject: [PATCH] adding field_X as a valid pattern --- .../src/geos/trame/app/components/properties_checker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/geos-trame/src/geos/trame/app/components/properties_checker.py b/geos-trame/src/geos/trame/app/components/properties_checker.py index 10157eaf2..0efe7258f 100644 --- a/geos-trame/src/geos/trame/app/components/properties_checker.py +++ b/geos-trame/src/geos/trame/app/components/properties_checker.py @@ -1,7 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies. -# SPDX-FileContributor: Kitware +# SPDX-FileContributor: Kitware, Jacques Franc from typing import Any +import re from trame_client.widgets.core import AbstractElement from trame_simput import get_simput_manager @@ -65,7 +66,8 @@ def _check_field( self, field: dict, array_names: list[ str ] ) -> None: field[ "invalid_properties" ].append( attr ) continue for array_name in arrays: - if array_name not in array_names: + pattern = re.compile( rf'^{re.escape(array_name)}(?:_\d)?$' ) + if all( not pattern.match( item ) for item in array_names ): field[ "invalid_properties" ].append( attr ) break