diff --git a/src/pydase/data_service/data_service.py b/src/pydase/data_service/data_service.py index bd4df93..445ac14 100644 --- a/src/pydase/data_service/data_service.py +++ b/src/pydase/data_service/data_service.py @@ -13,7 +13,7 @@ from pydase.data_service.task_manager import TaskManager from pydase.utils.helpers import ( convert_arguments_to_hinted_types, get_class_and_instance_attributes, - get_object_attr_from_path, + get_object_attr_from_path_list, is_property_attribute, parse_list_attr_and_index, update_value_if_changed, @@ -234,7 +234,7 @@ class DataService(rpyc.Service, AbstractDataService): # If attr_name corresponds to a list entry, extract the attr_name and the index attr_name, index = parse_list_attr_and_index(attr_name) # Traverse the object according to the path parts - target_obj = get_object_attr_from_path(self, path_list) + target_obj = get_object_attr_from_path_list(self, path_list) # If the attribute is a property, change it using the setter without getting the # property value (would otherwise be bad for expensive getter methods) @@ -242,7 +242,7 @@ class DataService(rpyc.Service, AbstractDataService): setattr(target_obj, attr_name, value) return - attr = get_object_attr_from_path(target_obj, [attr_name]) + attr = get_object_attr_from_path_list(target_obj, [attr_name]) if attr is None: return diff --git a/src/pydase/data_service/state_manager.py b/src/pydase/data_service/state_manager.py index 7134677..32f1644 100644 --- a/src/pydase/data_service/state_manager.py +++ b/src/pydase/data_service/state_manager.py @@ -9,7 +9,7 @@ import pydase.units as u from pydase.data_service.data_service import process_callable_attribute from pydase.data_service.data_service_cache import DataServiceCache from pydase.utils.helpers import ( - get_object_attr_from_path, + get_object_attr_from_path_list, is_property_attribute, parse_list_attr_and_index, ) @@ -195,7 +195,7 @@ class StateManager: attr_name, index = parse_list_attr_and_index(attr_name) # Traverse the object according to the path parts - target_obj = get_object_attr_from_path(self.service, parent_path_list) + target_obj = get_object_attr_from_path_list(self.service, parent_path_list) # If the attribute is a property, change it using the setter without getting # the property value (would otherwise be bad for expensive getter methods) diff --git a/src/pydase/utils/helpers.py b/src/pydase/utils/helpers.py index 9161013..3624b7a 100644 --- a/src/pydase/utils/helpers.py +++ b/src/pydase/utils/helpers.py @@ -31,7 +31,7 @@ def get_class_and_instance_attributes(obj: object) -> dict[str, Any]: return attrs -def get_object_attr_from_path(target_obj: Any, path: list[str]) -> Any: +def get_object_attr_from_path_list(target_obj: Any, path: list[str]) -> Any: """ Traverse the object tree according to the given path.