From 2632e7ba6e260470b95b0e76f14fff308c8238b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Wed, 2 Aug 2023 12:06:22 +0200 Subject: [PATCH] creating AbstractDataService class This is needed to split the CallbackManager into another class. --- .../data_service/abstract_data_service.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/pyDataInterface/data_service/abstract_data_service.py diff --git a/src/pyDataInterface/data_service/abstract_data_service.py b/src/pyDataInterface/data_service/abstract_data_service.py new file mode 100644 index 0000000..b87299c --- /dev/null +++ b/src/pyDataInterface/data_service/abstract_data_service.py @@ -0,0 +1,14 @@ +from abc import ABC +from collections.abc import Callable +from typing import Any + + +class AbstractDataService(ABC): + __root__: "AbstractDataService" + _callback_manager: Any + """ + This is a CallbackManager. Cannot type this here as this would lead to a recursive + loop. + """ + + _task_status_change_callbacks: list[Callable[[str, dict[str, Any] | None], None]]