Skip to content

Commit a12cca1

Browse files
🚨 auto fix by pre-commit hooks
1 parent 7284ffc commit a12cca1

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

nonebot/adapters/dodo/adapter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from nonebot import get_plugin_config
77
from nonebot.adapters import Adapter as BaseAdapter
8+
89
from nonebot.compat import type_validate_python
910
from nonebot.drivers import (
1011
URL,
@@ -30,7 +31,7 @@ def __init__(self, driver: Driver, **kwargs: Any):
3031
super().__init__(driver, **kwargs)
3132
self.dodo_config = get_plugin_config(Config)
3233
self.api_base: URL = URL("https://botopen.imdodo.com/api/v2")
33-
self.tasks: List["asyncio.Task"] = []
34+
self.tasks: List[asyncio.Task] = []
3435
self.setup()
3536

3637
@classmethod
@@ -86,7 +87,7 @@ async def run_bot(self, bot_info: BotConfig) -> None:
8687

8788
async def _forward_ws(self, bot: Bot, ws_url: URL) -> None:
8889
request = Request("GET", ws_url, timeout=30.0)
89-
heartbeat_task: Optional["asyncio.Task"] = None
90+
heartbeat_task: Optional[asyncio.Task] = None
9091
while True:
9192
try:
9293
async with self.websocket(request) as ws:

nonebot/adapters/dodo/bot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing_extensions import override
66

77
from nonebot.adapters import Bot as BaseBot
8+
89
from nonebot.compat import model_dump, type_validate_python
910
from nonebot.drivers import Request, Response
1011
from nonebot.message import handle_event

nonebot/adapters/dodo/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from typing_extensions import override
55

66
from nonebot.adapters import Event as BaseEvent
7+
78
from nonebot.compat import PYDANTIC_V2, ConfigDict, model_dump
89
from nonebot.utils import escape_tag
9-
1010
from pydantic import BaseModel, Field
1111

1212
from .compat import field_validator

nonebot/adapters/dodo/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
)
1414

1515
from nonebot.compat import PYDANTIC_V2, ConfigDict
16-
1716
from pydantic import (
1817
BaseModel as PydanticBaseModel,
1918
Field,

0 commit comments

Comments
 (0)