When setting a public attribute in a DataService instance, pydase will check if the value is observable. I.e., when the value is an instance of a user-defined class, the class should inherit from DataService or Observable. Built-in values like strings, ints, float, bools and alike are observable as are set through the __setattr__ method of the containing DataService class.
This PR simplifies the logic of the check and moves that code into the DataService class.
When setting a public attribute in a DataService instance, pydase will check if the value is observable. I.e., when the value is an instance of a user-defined class, the class should inherit from
DataService
orObservable
. Built-in values like strings, ints, float, bools and alike are observable as are set through the__setattr__
method of the containingDataService
class.This PR simplifies the logic of the check and moves that code into the
DataService
class.