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]