From bbfa191b71f89bcf540d4dbe4597e6cac176fee1 Mon Sep 17 00:00:00 2001 From: Toan Quach <93168955+toan-quach@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:02:19 +0700 Subject: [PATCH] refactor to include polars exposed type when checker raise (#2303) Co-authored-by: Toan Quach --- taipy/core/config/checkers/_data_node_config_checker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taipy/core/config/checkers/_data_node_config_checker.py b/taipy/core/config/checkers/_data_node_config_checker.py index f81b65dae0..a344115aff 100644 --- a/taipy/core/config/checkers/_data_node_config_checker.py +++ b/taipy/core/config/checkers/_data_node_config_checker.py @@ -223,9 +223,10 @@ def _check_exposed_type(self, data_node_config_id: str, data_node_config: DataNo if not isinstance(data_node_config.exposed_type, str): return if data_node_config.exposed_type not in DataNodeConfig._ALL_EXPOSED_TYPES: + valid_exposed_types_str = ", ".join([f'"{x}"' for x in DataNodeConfig._ALL_EXPOSED_TYPES]) self._error( data_node_config._EXPOSED_TYPE_KEY, data_node_config.exposed_type, f"The `{data_node_config._EXPOSED_TYPE_KEY}` of DataNodeConfig `{data_node_config_id}` " - f'must be either "pandas", "numpy", or a custom type.', + f"must be either {valid_exposed_types_str}, or a custom type.", )