⬆️ auto update by pre-commit hooks (#532)

* ⬆️ auto update by pre-commit hooks

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.6 → v0.11.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.6...v0.11.0)

* 🚨 auto fix by pre-commit hooks

* 🚨 添加一个 noqa(

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: shoucandanghehe <wallfjjd@gmail.com>
This commit is contained in:
pre-commit-ci[bot]
2025-03-19 06:11:18 +08:00
committed by GitHub
parent 2ef400ca28
commit 90f655259d
4 changed files with 6 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ ci:
autoupdate_commit_msg: ':arrow_up: auto update by pre-commit hooks'
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6
rev: v0.11.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

View File

@@ -46,7 +46,7 @@ class RecordKey(NamedTuple):
record_type: RecordType
def to_records(self) -> Records:
return cast(Records, f'{self.mode_type.value}_{self.record_type.value}')
return cast('Records', f'{self.mode_type.value}_{self.record_type.value}')
class Player:
@@ -89,7 +89,7 @@ class Player:
@property
def _request_user_parameter(self) -> str:
return self.user_id or cast(str, self.user_name).lower()
return self.user_id or cast('str', self.user_name).lower()
@property
async def user(self) -> User:

View File

@@ -64,7 +64,7 @@ class Player:
query = {'teaId': self.teaid}
else:
path = 'getUsernameInfo'
query = {'username': cast(str, self.user_name)}
query = {'username': cast('str', self.user_name)}
raw_user_info = await request.failover_request(
[i / path % query for i in BASE_URL], failover_code=[502], failover_exc=(TimeoutException,)
)
@@ -91,7 +91,7 @@ class Player:
if self._user_profile.get(params) is None:
raw_user_profile = await request.failover_request(
[
i / 'getProfile' % {'id': self.teaid or cast(str, self.user_name), **other_parameter}
i / 'getProfile' % {'id': self.teaid or cast('str', self.user_name), **other_parameter}
for i in BASE_URL
],
failover_code=[502],

View File

@@ -156,7 +156,7 @@ class SkinManager:
class Skin(ABC):
def __new__(cls, *args: Any, **kwargs: Any) -> Self: # noqa: ANN401, ARG003
def __new__(cls, *args: Any, **kwargs: Any) -> Self: # noqa: ANN401, ARG004
instance = super().__new__(cls)
SkinManager.register(instance)
return instance