mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-27 18:45:05 +08:00
📝 Docs: 更新 get_asgi
函数的文档字符串 (#2359)
This commit is contained in:
parent
f4a7ce2c09
commit
ae8ba9f55d
@ -170,7 +170,7 @@ def get_app() -> Any:
|
|||||||
|
|
||||||
|
|
||||||
def get_asgi() -> Any:
|
def get_asgi() -> Any:
|
||||||
"""获取全局 {ref}`nonebot.drivers.ASGIMixin` 对应
|
"""获取全局 {ref}`nonebot.drivers.ASGIMixin` 对应的
|
||||||
[ASGI](https://asgi.readthedocs.io/) 对象。
|
[ASGI](https://asgi.readthedocs.io/) 对象。
|
||||||
|
|
||||||
返回:
|
返回:
|
||||||
@ -189,7 +189,7 @@ def get_asgi() -> Any:
|
|||||||
driver = get_driver()
|
driver = get_driver()
|
||||||
assert isinstance(
|
assert isinstance(
|
||||||
driver, ASGIMixin
|
driver, ASGIMixin
|
||||||
), "asgi object is only available for reverse driver"
|
), "asgi object is only available for asgi driver"
|
||||||
return driver.asgi
|
return driver.asgi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user