mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-05 03:39:59 +08:00
Develop: 完全使用 ruff 替代 isort 与 black (#1757)
* 🚨 完全使用 ruff 替代 isort 与 black * 🚨 ruff lint&format
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
from nonebot.adapters import Bot
|
||||
from nonebot.plugin import PluginMetadata
|
||||
from nonebot_plugin_alconna import AlconnaQuery, Arparma, Match, Query
|
||||
from nonebot_plugin_session import EventSession
|
||||
from nonebot_plugin_alconna import Match, Query, Arparma, AlconnaQuery
|
||||
|
||||
from zhenxun.services.log import logger
|
||||
from zhenxun.configs.config import Config
|
||||
from zhenxun.utils.message import MessageUtils
|
||||
from zhenxun.configs.utils import PluginExtraData, RegisterConfig
|
||||
from zhenxun.services.log import logger
|
||||
from zhenxun.utils.enum import BlockType, PluginType
|
||||
from zhenxun.configs.utils import RegisterConfig, PluginExtraData
|
||||
from zhenxun.utils.message import MessageUtils
|
||||
|
||||
from .command import _status_matcher, _group_status_matcher
|
||||
from ._data_source import PluginManage, build_task, build_plugin, delete_help_image
|
||||
from ._data_source import PluginManage, build_plugin, build_task, delete_help_image
|
||||
from .command import _group_status_matcher, _status_matcher
|
||||
|
||||
base_config = Config.get("plugin_switch")
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from zhenxun.models.task_info import TaskInfo
|
||||
from zhenxun.models.plugin_info import PluginInfo
|
||||
from zhenxun.utils.enum import BlockType, PluginType
|
||||
from zhenxun.models.group_console import GroupConsole
|
||||
from zhenxun.utils.exception import GroupInfoNotFound
|
||||
from zhenxun.configs.path_config import DATA_PATH, IMAGE_PATH
|
||||
from zhenxun.utils.image_utils import RowStyle, BuildImage, ImageTemplate
|
||||
from zhenxun.models.group_console import GroupConsole
|
||||
from zhenxun.models.plugin_info import PluginInfo
|
||||
from zhenxun.models.task_info import TaskInfo
|
||||
from zhenxun.utils.enum import BlockType, PluginType
|
||||
from zhenxun.utils.exception import GroupInfoNotFound
|
||||
from zhenxun.utils.image_utils import BuildImage, ImageTemplate, RowStyle
|
||||
|
||||
HELP_FILE = IMAGE_PATH / "SIMPLE_HELP.png"
|
||||
|
||||
@@ -35,12 +35,8 @@ def plugin_row_style(column: str, text: str) -> RowStyle:
|
||||
RowStyle: RowStyle
|
||||
"""
|
||||
style = RowStyle()
|
||||
if (
|
||||
column == "全局状态"
|
||||
and text == "开启"
|
||||
or column != "全局状态"
|
||||
and column == "加载状态"
|
||||
and text == "SUCCESS"
|
||||
if (column == "全局状态" and text == "开启") or (
|
||||
column != "全局状态" and column == "加载状态" and text == "SUCCESS"
|
||||
):
|
||||
style.font_color = "#67C23A"
|
||||
elif column in {"全局状态", "加载状态"}:
|
||||
|
||||
Reference in New Issue
Block a user