令用法符合格式

This commit is contained in:
hemengyang
2022-01-12 18:53:30 +08:00
parent edb20a4786
commit 6d21cbed55
11 changed files with 64 additions and 93 deletions

View File

@ -62,8 +62,8 @@ def Depends(
dependency: 依赖函数。默认为参数的类型注释。
use_cache: 是否使用缓存。默认为 `True`。
.. code-block:: python
用法:
```python
def depend_func() -> Any:
return ...
@ -75,6 +75,7 @@ def Depends(
async def handler(param_name: Any = Depends(depend_func), gen: Any = Depends(depend_gen_func)):
...
```
"""
return DependsInner(dependency, use_cache=use_cache)