From 7beab1d05cba26472b4e9a1fbbe4e645dc8ec357 Mon Sep 17 00:00:00 2001 From: wwakabobik Date: Tue, 1 Oct 2024 19:26:36 +0200 Subject: [PATCH] Fix linters (sync) --- src/leonardo_api/leonardo_sync.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/leonardo_api/leonardo_sync.py b/src/leonardo_api/leonardo_sync.py index 0c47b8f..99fcc91 100644 --- a/src/leonardo_api/leonardo_sync.py +++ b/src/leonardo_api/leonardo_sync.py @@ -522,10 +522,7 @@ def upload_dataset_image(self, dataset_id: str, file_path: str) -> requests.Resp response.raise_for_status() data = response.json() self.__logger.debug( - "Dataset with dataset_id=%s started to upload from %s: %s", - dataset_id, - file_path, - response + "Dataset with dataset_id=%s started to upload from %s: %s", dataset_id, file_path, response ) upload_url = data["uploadDatasetImage"]["url"] fields = json.loads(data["uploadDatasetImage"]["fields"]) @@ -562,10 +559,7 @@ def upload_generated_image_to_dataset(self, dataset_id: str, generated_image_id: url = f"https://cloud.leonardo.ai/api/rest/v1/datasets/{dataset_id}/upload/gen" payload = {"generatedImageId": generated_image_id} self.__logger.debug( - "Requested to upload generated_image_id=%s to dataset_id=%s: POST %s", - generated_image_id, - dataset_id, - url + "Requested to upload generated_image_id=%s to dataset_id=%s: POST %s", generated_image_id, dataset_id, url ) session = self.___get_client_session("post") try: @@ -575,7 +569,7 @@ def upload_generated_image_to_dataset(self, dataset_id: str, generated_image_id: "Image with image_id=%s has been uploaded to dataset_id=%s: %s", generated_image_id, dataset_id, - response + response, ) session.close() return response