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