From 950f9509856fafa92f1abc552dcdd9fd14db825e Mon Sep 17 00:00:00 2001 From: Otto Date: Thu, 5 Feb 2026 20:26:36 +0000 Subject: [PATCH] style: Address review nits - Remove redundant extension from filename (was: block_png_uuid.png, now: block_uuid.png) - Use lazy logging format instead of f-string --- .../api/features/chat/tools/binary_output_processor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogpt_platform/backend/backend/api/features/chat/tools/binary_output_processor.py b/autogpt_platform/backend/backend/api/features/chat/tools/binary_output_processor.py index fce98bf17c..ed89e0c2a9 100644 --- a/autogpt_platform/backend/backend/api/features/chat/tools/binary_output_processor.py +++ b/autogpt_platform/backend/backend/api/features/chat/tools/binary_output_processor.py @@ -225,12 +225,12 @@ async def _save_binary( try: safe_block = sanitize_filename(block)[:20].lower() - filename = f"{safe_block}_{ext}_{uuid.uuid4().hex[:12]}.{ext}" + filename = f"{safe_block}_{uuid.uuid4().hex[:12]}.{ext}" file = await wm.write_file(content, filename) ref = f"workspace://{file.id}" cache[content_hash] = ref return ref except Exception as e: - logger.warning(f"Failed to save binary output: {e}") + logger.warning("Failed to save binary output: %s", e) return None