mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-13 08:07:13 +02:00
fix: removes inheritance warning for functions
This commit is contained in:
@ -70,7 +70,7 @@ class DataService(rpyc.Service, AbstractDataService):
|
|||||||
|
|
||||||
# every class defined by the user should inherit from DataService if it is
|
# every class defined by the user should inherit from DataService if it is
|
||||||
# assigned to a public attribute
|
# assigned to a public attribute
|
||||||
if not __name.startswith("_"):
|
if not __name.startswith("_") and not inspect.isfunction(__value):
|
||||||
self.__warn_if_not_observable(__value)
|
self.__warn_if_not_observable(__value)
|
||||||
|
|
||||||
# Set the attribute
|
# Set the attribute
|
||||||
|
@ -56,6 +56,9 @@ def test_basic_inheritance_warning(caplog: LogCaptureFixture) -> None:
|
|||||||
def some_method(self) -> None:
|
def some_method(self) -> None:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
async def some_task(self) -> None:
|
||||||
|
...
|
||||||
|
|
||||||
ServiceClass()
|
ServiceClass()
|
||||||
|
|
||||||
# neither of the attributes, methods or properties cause a warning log
|
# neither of the attributes, methods or properties cause a warning log
|
||||||
|
Reference in New Issue
Block a user