mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 00:55:07 +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:
|
||||
"""获取全局 {ref}`nonebot.drivers.ASGIMixin` 对应
|
||||
"""获取全局 {ref}`nonebot.drivers.ASGIMixin` 对应的
|
||||
[ASGI](https://asgi.readthedocs.io/) 对象。
|
||||
|
||||
返回:
|
||||
@ -189,7 +189,7 @@ def get_asgi() -> Any:
|
||||
driver = get_driver()
|
||||
assert isinstance(
|
||||
driver, ASGIMixin
|
||||
), "asgi object is only available for reverse driver"
|
||||
), "asgi object is only available for asgi driver"
|
||||
return driver.asgi
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user