Skip to content

Commit 378eeba

Browse files
authored
Merge pull request #41 from Agnes4m/pre-commit-ci-update-config
⬆️ auto update by pre-commit hooks
2 parents 04eda67 + c87ba1f commit 378eeba

File tree

9 files changed

+29
-22
lines changed

9 files changed

+29
-22
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ci:
88

99
repos:
1010
- repo: https://github.com/astral-sh/ruff-pre-commit
11-
rev: v0.1.4
11+
rev: v0.2.0
1212
hooks:
1313
- id: ruff
1414
args: [--fix, --exit-non-zero-on-fix]
@@ -19,7 +19,7 @@ repos:
1919
# - id: pyright
2020

2121
- repo: https://github.com/psf/black
22-
rev: 23.10.1
22+
rev: 24.1.1
2323
hooks:
2424
- id: black
2525
stages: [commit]

nonebot_plugin_l4d2_server/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1616
"""
1717

18-
1918
from nonebot import get_driver, require
2019

2120
require("nonebot_plugin_apscheduler") # noqa: F401

nonebot_plugin_l4d2_server/l4d2_file/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@
5858

5959

6060
@up.handle()
61-
async def _():
62-
...
61+
async def _(): ...
6362

6463

6564
@up.got("map_url", prompt="图来")

nonebot_plugin_l4d2_server/l4d2_file/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def open_packet(name: str, down_file: Path) -> str:
6666
".7z": unpack_7zfile,
6767
".rar": unpack_rarfile,
6868
}
69-
unpack_func = unpack_funcs.get(ext, None)
69+
unpack_func = unpack_funcs.get(ext)
7070
if not unpack_func:
7171
raise ValueError(f"不支持的拓展名: {ext}")
7272
unpack_func(down_file, down_path)

nonebot_plugin_l4d2_server/l4d2_image/images.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,19 @@
4848

4949

5050
@overload
51-
async def convert_img(img: Image.Image, is_base64: bool = False) -> bytes:
52-
...
51+
async def convert_img(img: Image.Image, is_base64: bool = False) -> bytes: ...
5352

5453

5554
@overload
56-
async def convert_img(img: Image.Image, is_base64: bool = True) -> str:
57-
...
55+
async def convert_img(img: Image.Image, is_base64: bool = True) -> str: ...
5856

5957

6058
@overload
61-
async def convert_img(img: bytes, is_base64: bool = False) -> str:
62-
...
59+
async def convert_img(img: bytes, is_base64: bool = False) -> str: ...
6360

6461

6562
@overload
66-
async def convert_img(img: Path, is_base64: bool = False) -> str:
67-
...
63+
async def convert_img(img: Path, is_base64: bool = False) -> str: ...
6864

6965

7066
async def convert_img(

nonebot_plugin_l4d2_server/l4d2_push/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ async def send_message(
213213

214214
async def server_is_change():
215215
"""检测服务器是否发生变化"""
216-
...
217216

218217

219218
if scheduler:

nonebot_plugin_l4d2_server/l4d2_update/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ async def _():
5050
"更新记录",
5151
"更新记录",
5252
"查看插件最近的更新记录",
53-
detail_des=("介绍:\n查看插件最近的有效Git更新记录\n \n指令:\n- <ft color=(238,120,0)>更新记录</ft>"),
53+
detail_des=(
54+
"介绍:\n查看插件最近的有效Git更新记录\n \n指令:\n- <ft color=(238,120,0)>更新记录</ft>"
55+
),
5456
)
5557
async def send_updatelog_msg(
5658
matcher: Matcher,

nonebot_plugin_l4d2_server/l4d2_utils/config.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,12 @@ class L4d2Config(BaseModel):
9494
l4_push_interval: int = Field(default=3, alias="定时任务间隔")
9595
l4_push_times: int = Field(default=10, alias="定时任务次数")
9696
l4_connect: bool = Field(default=True, alias="是否在查服命令后加入connect ip")
97-
l4_group_upload: bool = Field(default=False, alias="是否在群里传地图的时候,提示上传服务器")
98-
group_config: Dict[int, L4d2GroupConfig] = Field(default_factory=dict, alias="分群配置")
97+
l4_group_upload: bool = Field(
98+
default=False, alias="是否在群里传地图的时候,提示上传服务器"
99+
)
100+
group_config: Dict[int, L4d2GroupConfig] = Field(
101+
default_factory=dict, alias="分群配置"
102+
)
99103

100104
def update(self, **kwargs):
101105
for key, value in kwargs.items():

nonebot_plugin_l4d2_server/l4d2_web/webUI.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@
9898
label="后台管理用户名",
9999
name="web_username",
100100
value="${web_username}",
101-
labelRemark=Remark(shape="circle", content="登录本后台管理所需要的用户名。"), # noqa: E501
101+
labelRemark=Remark(
102+
shape="circle", content="登录本后台管理所需要的用户名。"
103+
), # noqa: E501
102104
),
103105
InputPassword(
104106
label="后台管理密码",
@@ -119,7 +121,9 @@
119121
label="字体",
120122
name="l4_font",
121123
value="${l4_font}",
122-
labelRemark=Remark(shape="circle", content="机器人返回图片中文字的字体。"), # noqa: E501
124+
labelRemark=Remark(
125+
shape="circle", content="机器人返回图片中文字的字体。"
126+
), # noqa: E501
123127
),
124128
Switch(
125129
label="是否图片发送单服务器查询",
@@ -197,7 +201,9 @@
197201
visibleOn="${total_enable}",
198202
joinValues=False,
199203
extractValue=True,
200-
labelRemark=Remark(shape="circle", content="在这里加入的用户,才能上传地图"), # noqa: E501
204+
labelRemark=Remark(
205+
shape="circle", content="在这里加入的用户,才能上传地图"
206+
), # noqa: E501
201207
),
202208
InputTag(
203209
label="坐牢三指令tag",
@@ -426,7 +432,9 @@
426432
Alert(
427433
level=LevelEnum.info,
428434
className="white-space-pre-wrap",
429-
body=(f"此数据库记录了{NICKNAME}所在服务器下的求生服务器。\n· 功能暂未完善"), # noqa: E501
435+
body=(
436+
f"此数据库记录了{NICKNAME}所在服务器下的求生服务器。\n· 功能暂未完善"
437+
), # noqa: E501
430438
),
431439
server_control,
432440
server_ditail,

0 commit comments

Comments
 (0)