diff --git a/app/image.py b/app/image.py index 1c4635a..6bfa7e8 100644 --- a/app/image.py +++ b/app/image.py @@ -45,10 +45,10 @@ async def fill_font(route: Route, request: Request): ".footer p{margin:5px auto;}" '
' + f"" ) html_render = HTMLRenderer( diff --git a/library/weibo/main.py b/library/weibo/main.py index bf32c14..4faf2fa 100644 --- a/library/weibo/main.py +++ b/library/weibo/main.py @@ -1,6 +1,5 @@ from __future__ import annotations -import asyncio from typing import Any, Literal import aiohttp diff --git a/plugins/gacha/main.py b/plugins/gacha/main.py index 26b7e15..3da8d62 100644 --- a/plugins/gacha/main.py +++ b/plugins/gacha/main.py @@ -42,7 +42,11 @@ async def get_sim_gacha(per: int = 2, status: int = 0): cmd = Alconna( "抽卡", - Args["count", int, Field(10, completion=lambda: "试试输入 300", unmatch_tips=lambda x: f"预期参数为数字,而不是 {x}\n例如:/抽卡 100")], + Args[ + "count", + int, + Field(10, completion=lambda: "试试输入 300", unmatch_tips=lambda x: f"预期参数为数字,而不是 {x}\n例如:/抽卡 100"), # noqa: E501 + ], Option("更新", help_text="卡池更新"), meta=CommandMeta("模拟方舟寻访", example="$抽卡 300", extra={"supports": {"mirai", "qqapi"}}), ) diff --git a/plugins/help/main.py b/plugins/help/main.py index ee3db0f..a463fdd 100644 --- a/plugins/help/main.py +++ b/plugins/help/main.py @@ -24,7 +24,7 @@ Field( -1, completion=lambda: f"试试 {random.randint(0, len(command_manager.get_commands()))}", - unmatch_tips=lambda x: f"预期输入为某个命令的id或者名称,而不是 {x}\n例如:/帮助 0" + unmatch_tips=lambda x: f"预期输入为某个命令的id或者名称,而不是 {x}\n例如:/帮助 0", ), ], meta=CommandMeta("查看帮助", extra={"supports": {"mirai", "qqapi"}}), diff --git a/plugins/query_record/main.py b/plugins/query_record/main.py index d3322a5..dd2f6d4 100644 --- a/plugins/query_record/main.py +++ b/plugins/query_record/main.py @@ -3,7 +3,7 @@ from pathlib import Path from secrets import token_hex -from arclet.alconna import Alconna, Arg, Args, Arparma, CommandMeta, Option, Field +from arclet.alconna import Alconna, Arg, Args, Arparma, CommandMeta, Field, Option from arclet.alconna.graia import Match, alcommand, assign from arknights_toolkit.images import update_operators from arknights_toolkit.record import ArkRecord @@ -17,7 +17,11 @@ alc = Alconna( "抽卡查询", Args["count#最近x抽", int, -1], - Option("绑定", Args[Arg("token", str, Field(unmatch_tips=lambda x: f"请输入您的凭证,而不是{x}"), seps="\n")], compact=True), + Option( + "绑定", + Args[Arg("token", str, Field(unmatch_tips=lambda x: f"请输入您的凭证,而不是{x}"), seps="\n")], + compact=True, # noqa: E501 + ), Option("更新", Args["name?#卡池名", str]["limit", bool, True]), meta=CommandMeta( "明日方舟抽卡数据查询,数据来源为方舟官网", diff --git a/plugins/random_operator/main.py b/plugins/random_operator/main.py index 19c2504..e87aa57 100644 --- a/plugins/random_operator/main.py +++ b/plugins/random_operator/main.py @@ -16,7 +16,11 @@ @alcommand( Alconna( "测试干员", - Args["name?#你的代号", [str, Notice], Field(completion=lambda: "你的代号是?", unmatch_tips=lambda x: f"输入的应该是名字或者 @提及某人,而不是 {x}")], + Args[ + "name?#你的代号", + [str, Notice], + Field(completion=lambda: "你的代号是?", unmatch_tips=lambda x: f"输入的应该是名字或者 @提及某人,而不是 {x}"), # noqa: E501 + ], meta=CommandMeta( "依据名字测试你会是什么干员", example="$测试干员 海猫", diff --git a/plugins/recruitment/main.py b/plugins/recruitment/main.py index f9fc53a..de3c777 100644 --- a/plugins/recruitment/main.py +++ b/plugins/recruitment/main.py @@ -13,7 +13,11 @@ cmd = Alconna( "公招", - Args["tags", MultiVar(str, "*"), Field(completion=lambda: "高资", unmatch_tips=lambda x: f"输入的应该是公招标签,而不是{x}\n例如:/公招 高资")], + Args[ + "tags", + MultiVar(str, "*"), + Field(completion=lambda: "高资", unmatch_tips=lambda x: f"输入的应该是公招标签,而不是{x}\n例如:/公招 高资"), + ], meta=CommandMeta( "自助访问 prts 的公招计算器并截图", usage="标签之间用空格分隔", diff --git a/plugins/sk_autosign/main.py b/plugins/sk_autosign/main.py index 4f31434..8c5fd6d 100644 --- a/plugins/sk_autosign/main.py +++ b/plugins/sk_autosign/main.py @@ -3,7 +3,7 @@ from datetime import datetime from secrets import token_hex -from arclet.alconna import Alconna, Args, CommandMeta, Option, Field +from arclet.alconna import Alconna, Args, CommandMeta, Field, Option from arclet.alconna.graia import Match, alcommand, assign from avilla.core import ActionFailed, Avilla, Context, Picture, RawResource from avilla.elizabeth.account import ElizabethAccount diff --git a/plugins/weather/main.py b/plugins/weather/main.py index 92b144f..4228391 100644 --- a/plugins/weather/main.py +++ b/plugins/weather/main.py @@ -38,9 +38,7 @@ if config.heweather and bot.config.platform.heweather_api_key and bot.config.platform.heweather_api_type: heweather = HeWeather( - bot.config.platform.heweather_api_key, - bot.config.platform.heweather_api_type, - bot.config.proxy + bot.config.platform.heweather_api_key, bot.config.platform.heweather_api_type, bot.config.proxy ) cache_dir = Path(bot.config.data_dir) / "plugins" / "weather" cache_dir.mkdir(parents=True, exist_ok=True) diff --git a/plugins/weibo/main.py b/plugins/weibo/main.py index c8457fe..4e1504e 100644 --- a/plugins/weibo/main.py +++ b/plugins/weibo/main.py @@ -1,5 +1,4 @@ import asyncio -import contextlib import random from secrets import token_hex @@ -44,18 +43,15 @@ weibo_fetch = Alconna( "微博", Arg( - "user;?#微博用户名称", - str, - Field( - completion=lambda: "比如说, 育碧", - unmatch_tips=lambda x: f"请输入微博用户名称,而不是{x}\n例如: /微博 育碧" - ) + "user;?#微博用户名称", + str, + Field(completion=lambda: "比如说, 育碧", unmatch_tips=lambda x: f"请输入微博用户名称,而不是{x}\n例如: /微博 育碧"), # noqa: E501 ), Arg("select#选择第几个用户", int, Field(default=-1, unmatch_tips=lambda x: f"请输入数字,而不是{x}")), Option( "动态", - Arg("index#从最前动态排起的第几个动态", int, Field(default=-1, unmatch_tips=lambda x: f"请输入数字,而不是{x}")) + - Arg("page#第几页动态", int, Field(default=1, unmatch_tips=lambda x: f"请输入数字,而不是{x}")), + Arg("index#从最前动态排起的第几个动态", int, Field(default=-1, unmatch_tips=lambda x: f"请输入数字,而不是{x}")) + + Arg("page#第几页动态", int, Field(default=1, unmatch_tips=lambda x: f"请输入数字,而不是{x}")), help_text="从微博获取指定用户的动态", ), Option("关注|增加关注", dest="follow", help_text="增加一位微博动态关注对象"),