style: restrict line-length

This commit is contained in:
Junyan Qin
2025-05-10 18:04:58 +08:00
parent b30016ed08
commit 055b389353
134 changed files with 1096 additions and 2595 deletions

View File

@@ -57,9 +57,7 @@ async def get_gewechat_image_base64(
) as response:
if response.status != 200:
# print(response)
raise Exception(
f'获取gewechat图片下载失败: {await response.text()}'
)
raise Exception(f'获取gewechat图片下载失败: {await response.text()}')
resp_data = await response.json()
if resp_data.get('ret') != 200:
@@ -79,9 +77,7 @@ async def get_gewechat_image_base64(
try:
async with session.get(download_url) as img_response:
if img_response.status != 200:
raise Exception(
f'下载图片失败: {await img_response.text()}, URL: {download_url}'
)
raise Exception(f'下载图片失败: {await img_response.text()}, URL: {download_url}')
image_data = await img_response.read()
@@ -128,9 +124,7 @@ async def get_wecom_image_base64(pic_url: str) -> tuple[str, str]:
return image_base64, image_format
async def get_qq_official_image_base64(
pic_url: str, content_type: str
) -> tuple[str, str]:
async def get_qq_official_image_base64(pic_url: str, content_type: str) -> tuple[str, str]:
"""
下载QQ官方图片
并且转换为base64格式