From 91db29cb565b0bc7ffb92fedbbed614c6fc76b75 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:41:09 +0000 Subject: [PATCH] :rotating_light: auto fix by pre-commit hooks --- .../subject/extractor/builtin/kaiheila.py | 2 +- .../subject/extractor/builtin/onebot_v11.py | 2 +- .../subject/extractor/builtin/qqguild.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nonebot_plugin_access_control/subject/extractor/builtin/kaiheila.py b/src/nonebot_plugin_access_control/subject/extractor/builtin/kaiheila.py index 3249ded..e997c3f 100644 --- a/src/nonebot_plugin_access_control/subject/extractor/builtin/kaiheila.py +++ b/src/nonebot_plugin_access_control/subject/extractor/builtin/kaiheila.py @@ -20,7 +20,7 @@ def extract_kaiheila_role(bot: Bot, event: Event, manager: SubjectManager): guild_id: Optional[str] = event.extra.guild_id getattr(event, "group_id", None) or getattr(event.extra.body, "channel_id", None) - author: Optional["User"] = event.extra.author + author: Optional[User] = event.extra.author if author is not None: li = [] diff --git a/src/nonebot_plugin_access_control/subject/extractor/builtin/onebot_v11.py b/src/nonebot_plugin_access_control/subject/extractor/builtin/onebot_v11.py index c3973d6..fda320b 100644 --- a/src/nonebot_plugin_access_control/subject/extractor/builtin/onebot_v11.py +++ b/src/nonebot_plugin_access_control/subject/extractor/builtin/onebot_v11.py @@ -16,7 +16,7 @@ def extract_onebot_v11_group_role(bot: Bot, event: Event, manager: SubjectManage return group_id = getattr(event, "group_id", None) - sender: Optional["Sender"] = getattr(event, "sender", None) + sender: Optional[Sender] = getattr(event, "sender", None) if group_id is not None and sender is not None: li = [] diff --git a/src/nonebot_plugin_access_control/subject/extractor/builtin/qqguild.py b/src/nonebot_plugin_access_control/subject/extractor/builtin/qqguild.py index 999d3cb..f289bc6 100644 --- a/src/nonebot_plugin_access_control/subject/extractor/builtin/qqguild.py +++ b/src/nonebot_plugin_access_control/subject/extractor/builtin/qqguild.py @@ -25,7 +25,7 @@ def extract_qqguild_role(bot: Bot, event: Event, manager: SubjectManager): guild_id: Optional[str] = getattr(event, "guild_id", None) channel_id: Optional[str] = getattr(event, "channel_id", None) - member: Optional["Member"] = getattr(event, "member", None) + member: Optional[Member] = getattr(event, "member", None) if member is not None: li = []