Skip to content

Commit

Permalink
Fix linters (sync)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwakabobik committed Oct 1, 2024
1 parent eddde38 commit 7beab1d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/leonardo_api/leonardo_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 7beab1d

Please sign in to comment.