mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-24 10:00:03 +02:00
updates is_property_attribute to accept the full_access_path instead of the attr_name only
This commit is contained in:
parent
658fb13d9d
commit
381d98b078
@ -153,7 +153,12 @@ def get_data_service_class_reference() -> Any:
|
|||||||
return getattr(pydase.data_service.data_service, "DataService")
|
return getattr(pydase.data_service.data_service, "DataService")
|
||||||
|
|
||||||
|
|
||||||
def is_property_attribute(target_obj: Any, attr_name: str) -> bool:
|
def is_property_attribute(target_obj: Any, access_path: str) -> bool:
|
||||||
|
parent_path, attr_name = (
|
||||||
|
".".join(access_path.split(".")[:-1]),
|
||||||
|
access_path.split(".")[-1],
|
||||||
|
)
|
||||||
|
target_obj = get_object_attr_from_path(target_obj, parent_path)
|
||||||
return isinstance(getattr(type(target_obj), attr_name, None), property)
|
return isinstance(getattr(type(target_obj), attr_name, None), property)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user