feat(api-nodes, pylint): use lazy formatting in logging functions (#10248)

This commit is contained in:
Alexander Piskun
2025-10-09 09:06:56 +03:00
committed by GitHub
parent 72c2071972
commit 51fb505ffa
9 changed files with 50 additions and 46 deletions

View File

@@ -296,7 +296,7 @@ def validate_video_result_response(response) -> None:
"""Validates that the Kling task result contains a video."""
if not is_valid_video_response(response):
error_msg = f"Kling task {response.data.task_id} succeeded but no video data found in response."
logging.error(f"Error: {error_msg}.\nResponse: {response}")
logging.error("Error: %s.\nResponse: %s", error_msg, response)
raise Exception(error_msg)
@@ -304,7 +304,7 @@ def validate_image_result_response(response) -> None:
"""Validates that the Kling task result contains an image."""
if not is_valid_image_response(response):
error_msg = f"Kling task {response.data.task_id} succeeded but no image data found in response."
logging.error(f"Error: {error_msg}.\nResponse: {response}")
logging.error("Error: %s.\nResponse: %s", error_msg, response)
raise Exception(error_msg)