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
This commit is contained in:
Otto
2026-02-05 20:26:36 +00:00
parent 4fe74d8e7f
commit 950f950985

View File

@@ -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