From 3545c8d393d2df62389ac101ce68ae59ab2e8813 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Sun, 22 Mar 2026 19:58:46 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=96=B0=E5=A2=9E=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4=E7=B1=BB=E5=9E=8B=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/astr_main_agent.py | 6 +++--- pyproject.toml | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/astrbot/core/astr_main_agent.py b/astrbot/core/astr_main_agent.py index 015989626..88cb6bda7 100644 --- a/astrbot/core/astr_main_agent.py +++ b/astrbot/core/astr_main_agent.py @@ -522,7 +522,7 @@ async def _compress_image_for_provider( if not enabled: return url_or_path return await compress_image(url_or_path, max_size=max_size, quality=quality) - except Exception as exc: # noqa: BLE001 + except Exception as exc: logger.error("Image compression failed: %s", exc) return url_or_path @@ -562,7 +562,7 @@ async def _compress_image_for_provider( if not enabled: return url_or_path return await compress_image(url_or_path, max_size=max_size, quality=quality) - except Exception as exc: # noqa: BLE001 + except Exception as exc: logger.error("Image compression failed: %s", exc) return url_or_path @@ -650,7 +650,7 @@ async def _process_quote_message( ): try: os.remove(compress_path) - except Exception as exc: # noqa: BLE001 + except Exception as exc: logger.warning("Fail to remove temporary compressed image: %s", exc) quoted_content = "\n".join(content_parts) diff --git a/pyproject.toml b/pyproject.toml index 93d88dfff..e0452b52d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,7 @@ dependencies = [ "anyio>=4.12.1", "argon2-cffi>=23.1.0", "plumbum>=1.10.0", + "textual>=8.1.1", ] [dependency-groups] @@ -79,6 +80,7 @@ dev = [ "pytest-asyncio>=1.1.0", "pytest-cov>=6.2.1", "ruff>=0.15.0", + "textual-dev>=1.8.0", ] [project.scripts]