From d09d54d153b8ab0c8d0ee6e7344dfdb17b243f5b Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 15 Nov 2022 14:28:22 +0100 Subject: [PATCH] fix empty path for get_resource and set_resource --- python-client/wmill/wmill/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-client/wmill/wmill/client.py b/python-client/wmill/wmill/client.py index 118f5b44da..d897d852d1 100644 --- a/python-client/wmill/wmill/client.py +++ b/python-client/wmill/wmill/client.py @@ -145,7 +145,7 @@ def get_result(job_id: str) -> Dict[str, Any]: return res.result.to_dict() # type: ignore -def get_resource(path: str | None) -> Any: +def get_resource(path: str | None = None) -> Any: """ Returns the resource at a given path as a python dict. """ @@ -172,7 +172,9 @@ def get_state() -> Any: return get_resource(None) -def set_resource(value: Any, path: str | None, resource_type: str = "state") -> None: +def set_resource( + value: Any, path: str | None = None, resource_type: str = "state" +) -> None: """ Set the resource at a given path as a string, creating it if it does not exist """