Skip to content

Commit

Permalink
🐛 add type annotation for image_fetch (#61)
Browse files Browse the repository at this point in the history
* Fix: add type annotation for `image_fetch`

* Update tools.py
  • Loading branch information
lgc2333 authored Aug 3, 2024
1 parent 7668c49 commit 732ddba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/uniseg/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def reply_fetch(event: Event, bot: Bot):
return await fn.extract_reply(event, bot)


async def image_fetch(event: Event, bot: Bot, state: T_State, img: Image, **kwargs):
async def image_fetch(event: Event, bot: Bot, state: T_State, img: Image, **kwargs) -> Optional[bytes]:
adapter_name = bot.adapter.get_name()
if adapter_name == "RedProtocol":
origin = img.origin
Expand Down

0 comments on commit 732ddba

Please sign in to comment.