mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-12 07:57:11 +02:00
fixes warnings tests
This commit is contained in:
@ -70,6 +70,11 @@ class DataService(rpyc.Service, AbstractDataService):
|
||||
# Warn if setting private attributes
|
||||
self._warn_on_private_attr_set(__name)
|
||||
|
||||
# every class defined by the user should inherit from DataService if it is
|
||||
# assigned to a public attribute
|
||||
if not __name.startswith("_"):
|
||||
warn_if_instance_class_does_not_inherit_from_data_service(__value)
|
||||
|
||||
# Set the attribute
|
||||
super().__setattr__(__name, __value)
|
||||
|
||||
|
@ -22,6 +22,7 @@ def warn_if_instance_class_does_not_inherit_from_data_service(__value: object) -
|
||||
and type(__value).__name__ not in ["CallbackManager", "TaskManager", "Quantity"]
|
||||
):
|
||||
logger.warning(
|
||||
"Warning: Class '%s' does not inherit from DataService.",
|
||||
"Class '%s' does not inherit from DataService. This may lead to unexpected "
|
||||
"behaviour!",
|
||||
type(__value).__name__,
|
||||
)
|
||||
|
Reference in New Issue
Block a user