adds docstring to autostart method

This commit is contained in:
Mose Müller 2024-09-13 13:04:59 +02:00
parent 2e31ebb7d9
commit e422d627af

View File

@ -6,6 +6,12 @@ from pydase.utils.helpers import is_property_attribute
def autostart_service_tasks( def autostart_service_tasks(
service: pydase.data_service.data_service.DataService, service: pydase.data_service.data_service.DataService,
) -> None: ) -> None:
"""Starts the service tasks defined with the `autostart` keyword argument.
This method goes through the attributes of the passed service and its nested
`pydase.DataService` instances and calls the start method on autostart-tasks.
"""
for attr in dir(service): for attr in dir(service):
if not is_property_attribute(service, attr): # prevent eval of property attrs if not is_property_attribute(service, attr): # prevent eval of property attrs
val = getattr(service, attr) val = getattr(service, attr)