mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +02:00
DataService.__warn_if_not_observable does not warn if setting function
This commit is contained in:
parent
eb32b34b59
commit
3f6692a1cd
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user