From d1d59591d8519793709263eed2444eaf2b188bda Mon Sep 17 00:00:00 2001 From: Windpicker-owo <3431391539@qq.com> Date: Sun, 31 Aug 2025 00:20:17 +0800 Subject: [PATCH] ruff --- bot.py | 8 +++----- plugins/napcat_adapter_plugin/plugin.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bot.py b/bot.py index 37105360b..9233b407b 100644 --- a/bot.py +++ b/bot.py @@ -23,11 +23,9 @@ else: # 最早期初始化日志系统,确保所有后续模块都使用正确的日志格式 from src.common.logger import initialize_logging, get_logger, shutdown_logging -# UI日志适配器 - 最小侵入式集成 -try: - import ui_log_adapter # 自动设置UI日志传输 -except ImportError: - pass +# UI日志适配器 +import ui_log_adapter + initialize_logging() diff --git a/plugins/napcat_adapter_plugin/plugin.py b/plugins/napcat_adapter_plugin/plugin.py index 9fb1c5697..ce94ece9e 100644 --- a/plugins/napcat_adapter_plugin/plugin.py +++ b/plugins/napcat_adapter_plugin/plugin.py @@ -206,7 +206,7 @@ class APITestHandler(BaseEventHandler): @register_plugin class NapcatAdapterPlugin(BasePlugin): plugin_name = CONSTS.PLUGIN_NAME - enable_plugin: bool = False + enable_plugin: bool = True dependencies: List[str] = [] # 插件依赖列表 python_dependencies: List[str] = [] # Python包依赖列表 config_file_name: str = "config.toml" # 配置文件名