From 18c71dd7f66b8c34273569ddfc574b3f25d71fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Wed, 2 Aug 2023 12:06:21 +0200 Subject: [PATCH] fix: fixing method serialization --- .../data_service/data_service_serializer.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pyDataInterface/data_service/data_service_serializer.py b/src/pyDataInterface/data_service/data_service_serializer.py index 6a48af4..38107a9 100644 --- a/src/pyDataInterface/data_service/data_service_serializer.py +++ b/src/pyDataInterface/data_service/data_service_serializer.py @@ -12,9 +12,7 @@ class DataServiceSerializer: def __init__(self, filename: str) -> None: self._tasks: dict[str, TaskDict] - def serialize( # noqa - self, tasks: dict[str, Any] = {} - ) -> dict[str, dict[str, Any]]: + def serialize(self) -> dict[str, dict[str, Any]]: # noqa """ Serializes the instance into a dictionary, preserving the structure of the instance. @@ -112,8 +110,8 @@ class DataServiceSerializer: for k, v in sig.parameters.items() } running_task_info = None - if key in tasks: # If there's a running task for this method - task_info = tasks[key] + if key in self._tasks: # If there's a running task for this method + task_info = self._tasks[key] running_task_info = task_info["kwargs"] result[key] = {