📝 replace deprecated caution/important admonitions

This commit is contained in:
StarHeartHunt
2026-07-22 22:21:49 +08:00
parent c42629ba7f
commit 641e95b73c
83 changed files with 147 additions and 147 deletions
+1 -1
View File
@@ -558,7 +558,7 @@ async def _(x: httpx.AsyncClient = Depends(get_client)):
</TabItem>
</Tabs>
:::caution 注意
:::warning 注意
生成器作为依赖时,其中只能进行一次 `yield`,否则将会触发异常。如果对此有疑问并想探究原因,可以参考 [contextmanager](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.contextmanager) 和 [asynccontextmanager](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.asynccontextmanager) 文档。事实上,NoneBot 内部就使用了这两个装饰器。
:::