mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-07 04:26:45 +00:00
🐛 Fix: 修改遗漏的过时 Pydantic 方法 (#2577)
This commit is contained in:
@ -30,6 +30,7 @@ from nonebot.drivers import Driver as BaseDriver
|
||||
from nonebot.config import Config as NoneBotConfig
|
||||
from nonebot.drivers import Request as BaseRequest
|
||||
from nonebot.drivers import WebSocket as BaseWebSocket
|
||||
from nonebot.compat import model_dump, type_validate_python
|
||||
from nonebot.drivers import HTTPServerSetup, WebSocketServerSetup
|
||||
|
||||
try:
|
||||
@ -81,7 +82,7 @@ class Driver(BaseDriver, ASGIMixin):
|
||||
def __init__(self, env: Env, config: NoneBotConfig):
|
||||
super().__init__(env, config)
|
||||
|
||||
self.quart_config = Config(**config.dict())
|
||||
self.quart_config = type_validate_python(Config, model_dump(config))
|
||||
|
||||
self._server_app = Quart(
|
||||
self.__class__.__qualname__, **self.quart_config.quart_extra
|
||||
|
Reference in New Issue
Block a user