mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-26 07:41:20 +00:00
✨ Feature: 优先使用 Annotated
的最后一个子依赖 (#2360)
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
This commit is contained in:
@ -79,6 +79,12 @@ async def annotated_prior_depend(
|
||||
return x
|
||||
|
||||
|
||||
async def annotated_multi_depend(
|
||||
x: Annotated[Annotated[int, Depends(lambda: 2)], Depends(dependency)]
|
||||
):
|
||||
return x
|
||||
|
||||
|
||||
# test sub dependency type mismatch
|
||||
async def sub_type_mismatch(b: FooBot = Depends(sub_bot)):
|
||||
return b
|
||||
|
Reference in New Issue
Block a user