mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-23 01:20:03 +02:00
chore: replacing old method, adding TODO
This commit is contained in:
parent
66376e2e6c
commit
a2c60a9c40
@ -181,12 +181,10 @@ def get_data_service_class_reference() -> Any:
|
|||||||
|
|
||||||
|
|
||||||
def is_property_attribute(target_obj: Any, access_path: str) -> bool:
|
def is_property_attribute(target_obj: Any, access_path: str) -> bool:
|
||||||
parent_path, attr_name = (
|
path_parts = parse_full_access_path(access_path)
|
||||||
".".join(access_path.split(".")[:-1]),
|
target_obj = get_object_by_path_parts(target_obj, path_parts[:-1])
|
||||||
access_path.split(".")[-1],
|
# TODO: check if target_obj is dict or list
|
||||||
)
|
return isinstance(getattr(type(target_obj), path_parts[-1], None), property)
|
||||||
target_obj = get_object_attr_from_path(target_obj, parent_path)
|
|
||||||
return isinstance(getattr(type(target_obj), attr_name, None), property)
|
|
||||||
|
|
||||||
|
|
||||||
def function_has_arguments(func: Callable[..., Any]) -> bool:
|
def function_has_arguments(func: Callable[..., Any]) -> bool:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user