mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-05 03:26:46 +00:00
✨ Feature: 支持 PEP 695 类型别名 (#3621)
This commit is contained in:
10
tests/python_3_12/plugins/aliased_param/param_arg.py
Normal file
10
tests/python_3_12/plugins/aliased_param/param_arg.py
Normal file
@ -0,0 +1,10 @@
|
||||
from typing import Annotated
|
||||
|
||||
from nonebot.adapters import Message
|
||||
from nonebot.params import Arg
|
||||
|
||||
type AliasedArg = Annotated[Message, Arg()]
|
||||
|
||||
|
||||
async def aliased_arg(key: AliasedArg) -> Message:
|
||||
return key
|
Reference in New Issue
Block a user