Skip to content

Commit

Permalink
Merge branch 'develop' into feature/prepare-for-extendability
Browse files Browse the repository at this point in the history
  • Loading branch information
FredLL-Avaiga authored Jan 30, 2025
2 parents c31d967 + 65828fc commit 7c26075
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions taipy/core/config/checkers/_data_node_config_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,21 +218,22 @@ def _check_property_types(self, data_node_config_id: str, data_node_config: Data
prop_value = data_node_config.properties.get(prop_key) if data_node_config.properties else None

if prop_value:
if isclass(prop_type) and isclass(prop_value) and not issubclass(prop_value, prop_type):
self._error(
prop_key,
prop_value,
f"`{prop_key}` of DataNodeConfig `{data_node_config_id}` must be"
f" populated with a subclass of {prop_type}.",
)
if not isinstance(prop_value, prop_type):
if isclass(prop_type) and isclass(prop_value):
if not issubclass(prop_value, prop_type):
self._error(
prop_key,
prop_value,
f"`{prop_key}` of DataNodeConfig `{data_node_config_id}` must be"
f" populated with a subclass of {prop_type}.",
)
elif not isinstance(prop_value, prop_type):
self._error(
prop_key,
prop_value,
f"`{prop_key}` of DataNodeConfig `{data_node_config_id}` must be"
f" populated with a {prop_type}.",
)
if prop_type == Callable and callable(prop_value) and prop_value.__name__ == "<lambda>":
elif prop_type == Callable and callable(prop_value) and prop_value.__name__ == "<lambda>":
self._error(
prop_key,
prop_value,
Expand Down

0 comments on commit 7c26075

Please sign in to comment.