style: introduce ruff as linter and formatter (#1356)

* style: remove necessary imports

* style: fix F841

* style: fix F401

* style: fix F811

* style: fix E402

* style: fix E721

* style: fix E722

* style: fix E722

* style: fix F541

* style: ruff format

* style: all passed

* style: add ruff in deps

* style: more ignores in ruff.toml

* style: add pre-commit
This commit is contained in:
Junyan Qin (Chin)
2025-04-29 17:24:07 +08:00
committed by GitHub
parent 09e70d70e9
commit 209f16af76
240 changed files with 5307 additions and 4689 deletions

View File

@@ -27,7 +27,7 @@ class PersonMessageReceived(BaseEventModel):
launcher_id: typing.Union[int, str]
"""发起对象ID(群号/QQ号)"""
sender_id: typing.Union[int, str]
"""发送者ID(QQ号)"""
@@ -40,7 +40,7 @@ class GroupMessageReceived(BaseEventModel):
launcher_type: str
launcher_id: typing.Union[int, str]
sender_id: typing.Union[int, str]
message_chain: platform_message.MessageChain
@@ -52,7 +52,7 @@ class PersonNormalMessageReceived(BaseEventModel):
launcher_type: str
launcher_id: typing.Union[int, str]
sender_id: typing.Union[int, str]
text_message: str
@@ -70,7 +70,7 @@ class PersonCommandSent(BaseEventModel):
launcher_type: str
launcher_id: typing.Union[int, str]
sender_id: typing.Union[int, str]
command: str
@@ -94,7 +94,7 @@ class GroupNormalMessageReceived(BaseEventModel):
launcher_type: str
launcher_id: typing.Union[int, str]
sender_id: typing.Union[int, str]
text_message: str
@@ -112,7 +112,7 @@ class GroupCommandSent(BaseEventModel):
launcher_type: str
launcher_id: typing.Union[int, str]
sender_id: typing.Union[int, str]
command: str
@@ -136,7 +136,7 @@ class NormalMessageResponded(BaseEventModel):
launcher_type: str
launcher_id: typing.Union[int, str]
sender_id: typing.Union[int, str]
session: core_entities.Session