Skip to content

Commit 49ca8f6

Browse files
🚨 auto fix by pre-commit hooks
1 parent 834e5ba commit 49ca8f6

5 files changed

Lines changed: 9 additions & 11 deletions

File tree

zhenxun/builtin_plugins/hooks/auth/auth_admin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ async def auth_admin(
7373
raise SkipPluginException(
7474
f"{plugin.name}({plugin.module}) 管理员权限不足...",
7575
tip_message=(
76-
f"你的权限不足喔,该功能需要的权限等级: "
77-
f"{plugin.admin_level}"
76+
f"你的权限不足喔,该功能需要的权限等级: {plugin.admin_level}"
7877
),
7978
tip_background=True,
8079
)

zhenxun/builtin_plugins/scheduler/auto_update_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async def _prune_stale_tags():
5555
deleted_count = await tag_manager.prune_stale_group_links()
5656
if deleted_count > 0:
5757
logger.info(
58-
f"定时任务:成功清理了 {deleted_count} 个无效的群组标签" f"关联。",
58+
f"定时任务:成功清理了 {deleted_count} 个无效的群组标签关联。",
5959
"群组标签管理",
6060
)
6161
else:

zhenxun/builtin_plugins/sign_in/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
lik2relation,
2424
)
2525

26-
assert (
27-
len(level2attitude) == len(lik2level) == len(lik2relation)
28-
), "好感度态度、等级、关系长度不匹配!"
26+
assert len(level2attitude) == len(lik2level) == len(lik2relation), (
27+
"好感度态度、等级、关系长度不匹配!"
28+
)
2929

3030
AVA_URL = "http://q1.qlogo.cn/g?b=qq&nk={}&s=160"
3131

zhenxun/builtin_plugins/superuser/tag_manage.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,9 @@ async def handle_delete(names: Match[list[str]]):
426426
async def handle_clear():
427427
confirm = await prompt_until(
428428
"【警告】此操作将删除所有群组标签,是否继续?\n请输入 `是` 或 `确定` 确认操作",
429-
lambda msg: msg.extract_plain_text().lower()
430-
in ["是", "确定", "yes", "confirm"],
429+
lambda msg: (
430+
msg.extract_plain_text().lower() in ["是", "确定", "yes", "confirm"]
431+
),
431432
timeout=30,
432433
retry=1,
433434
)

zhenxun/services/db_context/schema_guard.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,7 @@ def _index_sql(table: str, columns: tuple[str, ...], dialect: Dialect) -> str |
339339
index_sql = _quote_identifier(_index_name(table, columns), dialect)
340340
columns_sql = ", ".join(_quote_identifier(column, dialect) for column in columns)
341341
if dialect in {"sqlite", "postgres"}:
342-
return (
343-
f"CREATE INDEX IF NOT EXISTS {index_sql} " f"ON {table_sql}({columns_sql})"
344-
)
342+
return f"CREATE INDEX IF NOT EXISTS {index_sql} ON {table_sql}({columns_sql})"
345343
if dialect == "mysql":
346344
return f"CREATE INDEX {index_sql} ON {table_sql}({columns_sql})"
347345
return None

0 commit comments

Comments
 (0)