From 026ceb50288ef829432e1a8e0c789f7d8b51ff6f Mon Sep 17 00:00:00 2001 From: Akirami <66513481+A-kirami@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:11:23 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20Docs:=20=E4=BF=AE=E5=A4=8D=E5=AD=90?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E8=A1=8C?= =?UTF-8?q?=E5=8F=B7=E9=94=99=E8=AF=AF=20(#2279)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/docs/advanced/dependency.mdx | 6 +++--- .../versioned_docs/version-2.0.0/advanced/dependency.mdx | 6 +++--- .../versioned_docs/version-2.0.1/advanced/dependency.mdx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/website/docs/advanced/dependency.mdx b/website/docs/advanced/dependency.mdx index 1be9bc79..d511403f 100644 --- a/website/docs/advanced/dependency.mdx +++ b/website/docs/advanced/dependency.mdx @@ -219,7 +219,7 @@ async def _(e: Union[ActionFailed, NetworkError]): ... -```python {4,16} +```python {5,15} from typing import Annotated from nonebot import on_command @@ -241,7 +241,7 @@ async def _(event: Annotated[Event, Depends(check)]): -```python {2,14} +```python {3,13} from nonebot import on_command from nonebot.adapters import Event from nonebot.params import Depends @@ -267,7 +267,7 @@ async def _(event: Event = Depends(check)): 特别的,我们可以为 `Dependent` 对象定义一系列前置子依赖,它们会在参数执行前被顺序执行,且返回值将会被忽略,例如: -```python {2,14} +```python {11} from nonebot import on_command from nonebot.adapters import Event from nonebot.params import Depends diff --git a/website/versioned_docs/version-2.0.0/advanced/dependency.mdx b/website/versioned_docs/version-2.0.0/advanced/dependency.mdx index 10eefbe4..f62e3a7c 100644 --- a/website/versioned_docs/version-2.0.0/advanced/dependency.mdx +++ b/website/versioned_docs/version-2.0.0/advanced/dependency.mdx @@ -208,7 +208,7 @@ async def _(e: Union[ActionFailed, NetworkError]): ... -```python {4,16} +```python {5,15} from typing import Annotated from nonebot import on_command @@ -230,7 +230,7 @@ async def _(event: Annotated[Event, Depends(check)]): -```python {2,14} +```python {3,13} from nonebot import on_command from nonebot.adapters import Event from nonebot.params import Depends @@ -256,7 +256,7 @@ async def _(event: Event = Depends(check)): 特别的,我们可以为 `Dependent` 对象定义一系列前置子依赖,它们会在参数执行前被顺序执行,且返回值将会被忽略,例如: -```python {2,14} +```python {11} from nonebot import on_command from nonebot.adapters import Event from nonebot.params import Depends diff --git a/website/versioned_docs/version-2.0.1/advanced/dependency.mdx b/website/versioned_docs/version-2.0.1/advanced/dependency.mdx index 1be9bc79..d511403f 100644 --- a/website/versioned_docs/version-2.0.1/advanced/dependency.mdx +++ b/website/versioned_docs/version-2.0.1/advanced/dependency.mdx @@ -219,7 +219,7 @@ async def _(e: Union[ActionFailed, NetworkError]): ... -```python {4,16} +```python {5,15} from typing import Annotated from nonebot import on_command @@ -241,7 +241,7 @@ async def _(event: Annotated[Event, Depends(check)]): -```python {2,14} +```python {3,13} from nonebot import on_command from nonebot.adapters import Event from nonebot.params import Depends @@ -267,7 +267,7 @@ async def _(event: Event = Depends(check)): 特别的,我们可以为 `Dependent` 对象定义一系列前置子依赖,它们会在参数执行前被顺序执行,且返回值将会被忽略,例如: -```python {2,14} +```python {11} from nonebot import on_command from nonebot.adapters import Event from nonebot.params import Depends