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 inspect
|
||||||
import logging
|
import logging
|
||||||
|
from collections.abc import Callable
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@ -68,7 +69,18 @@ class DataService(AbstractDataService):
|
|||||||
|
|
||||||
if not issubclass(
|
if not issubclass(
|
||||||
value_class,
|
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):
|
) and not is_descriptor(__value):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Class '%s' does not inherit from DataService. This may lead to"
|
"Class '%s' does not inherit from DataService. This may lead to"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user