From 3f6692a1cd48fa5006c62220070a91e68f9603a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Thu, 3 Oct 2024 10:55:28 +0200 Subject: [PATCH] DataService.__warn_if_not_observable does not warn if setting function --- src/pydase/data_service/data_service.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pydase/data_service/data_service.py b/src/pydase/data_service/data_service.py index e625ad9..cc7d5ff 100644 --- a/src/pydase/data_service/data_service.py +++ b/src/pydase/data_service/data_service.py @@ -1,5 +1,6 @@ import inspect import logging +from collections.abc import Callable from enum import Enum from typing import Any @@ -68,7 +69,18 @@ class DataService(AbstractDataService): if not issubclass( value_class, - (int | float | bool | str | list | dict | Enum | u.Quantity | Observable), + ( + int + | float + | bool + | str + | list + | dict + | Enum + | u.Quantity + | Observable + | Callable + ), ) and not is_descriptor(__value): logger.warning( "Class '%s' does not inherit from DataService. This may lead to"