mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-06-18 10:28:23 +00:00
🏷️ fix class inherit in pyi
This commit is contained in:
parent
8db70dbb0c
commit
26207f762b
@ -1,7 +1,7 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from nonebot.config import Config
|
from nonebot.config import Config
|
||||||
from nonebot.adapters import BaseBot
|
from nonebot.adapters import BaseBot, BaseEvent, BaseMessage, BaseMessageSegment
|
||||||
from nonebot.typing import Any, Dict, List, Union, Driver, Optional, NoReturn, WebSocket, Iterable
|
from nonebot.typing import Any, Dict, List, Union, Driver, Optional, NoReturn, WebSocket, Iterable
|
||||||
|
|
||||||
|
|
||||||
@ -750,7 +750,7 @@ class Bot(BaseBot):
|
|||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
class Event:
|
class Event(BaseEvent):
|
||||||
|
|
||||||
def __init__(self, raw_event: dict):
|
def __init__(self, raw_event: dict):
|
||||||
...
|
...
|
||||||
@ -856,7 +856,7 @@ class Event:
|
|||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
class MessageSegment:
|
class MessageSegment(BaseMessageSegment):
|
||||||
|
|
||||||
def __init__(self, type: str, data: Dict[str, Any]) -> None:
|
def __init__(self, type: str, data: Dict[str, Any]) -> None:
|
||||||
...
|
...
|
||||||
@ -982,7 +982,7 @@ class MessageSegment:
|
|||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
class Message:
|
class Message(BaseMessage):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _construct(msg: Union[str, dict, list]) -> Iterable[MessageSegment]:
|
def _construct(msg: Union[str, dict, list]) -> Iterable[MessageSegment]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user