From b1d162a28b6fd1ffa1a95d3f2446c767e5d81d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Wed, 2 Aug 2023 12:06:20 +0200 Subject: [PATCH] fix: update start_task function signature to match original async function --- src/pyDataInterface/data_service/data_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyDataInterface/data_service/data_service.py b/src/pyDataInterface/data_service/data_service.py index 110745d..dbd98ef 100644 --- a/src/pyDataInterface/data_service/data_service.py +++ b/src/pyDataInterface/data_service/data_service.py @@ -2,6 +2,7 @@ import asyncio import inspect from collections.abc import Callable from enum import Enum +from functools import wraps from itertools import chain from typing import Any @@ -95,6 +96,7 @@ class DataService(rpyc.Service): self, predicate=inspect.iscoroutinefunction ): + @wraps(method) def start_task(*args: Any, **kwargs: Any) -> None: async def task(*args: Any, **kwargs: Any) -> None: try: @@ -507,7 +509,6 @@ class DataService(rpyc.Service): "type": "method", "async": asyncio.iscoroutinefunction(value), "parameters": parameters, - "readonly": False, "doc": inspect.getdoc(value), } elif isinstance(getattr(self.__class__, key, None), property):