Files
nonebot2/tests/python_3_12/plugins/aliased_param/param_depend.py
2025-08-07 14:54:22 +08:00

22 lines
336 B
Python

from typing import Annotated
from nonebot import on_message
from nonebot.params import Depends
test_depends = on_message()
runned = []
def dependency():
runned.append(1)
return 1
type AliasedDepends = Annotated[int, Depends(dependency)]
@test_depends.handle()
async def aliased_depends(x: AliasedDepends):
return x