🚨 ruff auto fix

This commit is contained in:
2024-04-23 22:52:04 +08:00
parent bd0a8ea447
commit 30515d1907
3 changed files with 13 additions and 14 deletions

View File

@@ -81,7 +81,7 @@ class SuccessModel(BaseSuccessModel):
discord: Discord | None
class Distinguishment(BaseModel):
type: str # noqa: A003
type: str
id: str = Field(..., alias='_id')
username: str

View File

@@ -2,7 +2,7 @@ from contextlib import suppress
from dataclasses import dataclass
from io import StringIO
from re import match
from typing import Literal, NoReturn
from typing import Literal
from urllib.parse import urlencode
from lxml import etree
@@ -87,10 +87,9 @@ class Processor(ProcessorMeta):
self.processed_data.user_profile = self.raw_response.user_profile.decode()
return self.processed_data.user_profile
async def check_user(self) -> None | NoReturn:
async def check_user(self) -> None:
if 'user not found!' in await self.get_user_profile():
raise RequestError('用户不存在!')
return None
async def get_user_name(self) -> str:
"""获取用户名"""