From 1e7eb2cf1c468f153a79961b45f996d8d658e637 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 09:21:31 +0000 Subject: [PATCH] :balloon: auto fixes by pre-commit hooks --- astrbot/core/platform/sources/gewechat/client.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index bc5e65c8d..edc7afb55 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -75,8 +75,7 @@ class SimpleGewechatClient: self.stop = False async def get_token_id(self): - """获取 Gewechat Token。 - """ + """获取 Gewechat Token。""" async with aiohttp.ClientSession() as session: async with session.post(f"{self.base_url}/tools/getTokenId") as resp: json_blob = await resp.json() @@ -320,8 +319,7 @@ class SimpleGewechatClient: logger.info("gewechat 适配器已关闭。") async def check_online(self, appid: str): - """检查 APPID 对应的设备是否在线。 - """ + """检查 APPID 对应的设备是否在线。""" async with aiohttp.ClientSession() as session: async with session.post( f"{self.base_url}/login/checkOnline", @@ -332,8 +330,7 @@ class SimpleGewechatClient: return json_blob["data"] async def logout(self): - """登出 gewechat。 - """ + """登出 gewechat。""" if self.appid: online = await self.check_online(self.appid) if online: @@ -347,8 +344,7 @@ class SimpleGewechatClient: logger.info(f"登出结果: {json_blob}") async def login(self): - """登录 gewechat。一般来说插件用不到这个方法。 - """ + """登录 gewechat。一般来说插件用不到这个方法。""" if self.token is None: await self.get_token_id()