From f2217c8892d4f652356f2566d369237b1dd24dd7 Mon Sep 17 00:00:00 2001 From: Johnny Sequeira Date: Sat, 31 Aug 2024 09:32:39 -0600 Subject: [PATCH] Adding suggestions --- qfieldcloud_sdk/sdk.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qfieldcloud_sdk/sdk.py b/qfieldcloud_sdk/sdk.py index 71f1d2d..6e75cd2 100644 --- a/qfieldcloud_sdk/sdk.py +++ b/qfieldcloud_sdk/sdk.py @@ -227,7 +227,7 @@ def __init__( "Cannot create a new QFieldCloud client without a url passed in the constructor or as environment variable QFIELDCLOUD_URL" ) - def login(self, username: str, password: str) -> Dict: + def login(self, username: str, password: str) -> Dict[str, Any]: """Logins with the provided credentials. Args: @@ -313,9 +313,6 @@ def list_remote_files( Example: client.list_remote_files("project_id", True) - - Todo: - * Remove this temporary decoration with `etag` key """ params = {} @@ -324,6 +321,7 @@ def list_remote_files( resp = self._request("GET", f"files/{project_id}", params=params) remote_files = resp.json() + # TODO remove this temporary decoration with `etag` key remote_files = list(map(lambda f: {"etag": f["md5sum"], **f}, remote_files)) return remote_files