diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b12ccdf..b66dc78 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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.7.2 + rev: v0.8.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/nonebot/adapters/onebot/v11/event.py b/nonebot/adapters/onebot/v11/event.py index 712d1f9..b6ca989 100644 --- a/nonebot/adapters/onebot/v11/event.py +++ b/nonebot/adapters/onebot/v11/event.py @@ -570,26 +570,26 @@ class HeartbeatMetaEvent(MetaEvent): __all__ = [ "Event", - "MessageEvent", - "PrivateMessageEvent", - "GroupMessageEvent", - "NoticeEvent", - "GroupUploadNoticeEvent", + "FriendAddNoticeEvent", + "FriendRecallNoticeEvent", + "FriendRequestEvent", "GroupAdminNoticeEvent", + "GroupBanNoticeEvent", "GroupDecreaseNoticeEvent", "GroupIncreaseNoticeEvent", - "GroupBanNoticeEvent", - "FriendAddNoticeEvent", + "GroupMessageEvent", "GroupRecallNoticeEvent", - "FriendRecallNoticeEvent", + "GroupRequestEvent", + "GroupUploadNoticeEvent", + "HeartbeatMetaEvent", + "HonorNotifyEvent", + "LifecycleMetaEvent", + "LuckyKingNotifyEvent", + "MessageEvent", + "MetaEvent", + "NoticeEvent", "NotifyEvent", "PokeNotifyEvent", - "LuckyKingNotifyEvent", - "HonorNotifyEvent", + "PrivateMessageEvent", "RequestEvent", - "FriendRequestEvent", - "GroupRequestEvent", - "MetaEvent", - "LifecycleMetaEvent", - "HeartbeatMetaEvent", ] diff --git a/nonebot/adapters/onebot/v11/permission.py b/nonebot/adapters/onebot/v11/permission.py index 0b6b8bc..519bc5c 100644 --- a/nonebot/adapters/onebot/v11/permission.py +++ b/nonebot/adapters/onebot/v11/permission.py @@ -67,12 +67,12 @@ async def _group_owner(event: GroupMessageEvent) -> bool: """匹配任意群主群聊消息类型事件""" __all__ = [ + "GROUP", + "GROUP_ADMIN", + "GROUP_MEMBER", + "GROUP_OWNER", "PRIVATE", "PRIVATE_FRIEND", "PRIVATE_GROUP", "PRIVATE_OTHER", - "GROUP", - "GROUP_MEMBER", - "GROUP_ADMIN", - "GROUP_OWNER", ] diff --git a/nonebot/adapters/onebot/v12/permission.py b/nonebot/adapters/onebot/v12/permission.py index 45f562f..2d83641 100644 --- a/nonebot/adapters/onebot/v12/permission.py +++ b/nonebot/adapters/onebot/v12/permission.py @@ -25,4 +25,4 @@ async def _group(event: GroupMessageEvent) -> bool: GROUP: Permission = Permission(_group) """匹配任意群聊消息类型事件""" -__all__ = ["PRIVATE", "GROUP"] +__all__ = ["GROUP", "PRIVATE"]