change typing

This commit is contained in:
yanyongyu
2020-08-07 17:51:57 +08:00
parent f2b6f08599
commit 332aac6497
5 changed files with 56 additions and 19 deletions

View File

@ -5,6 +5,7 @@ import abc
from functools import reduce
from nonebot.config import Config
from nonebot.drivers import BaseWebSocket
from nonebot.typing import Dict, Union, Iterable, Optional
@ -12,11 +13,19 @@ class BaseBot(abc.ABC):
@abc.abstractmethod
def __init__(self,
type: str,
connection_type: str,
config: Config,
self_id: int,
*,
websocket=None):
websocket: BaseWebSocket = None):
self.connection_type = connection_type
self.config = config
self.self_id = self_id
self.websocket = websocket
@property
@abc.abstractmethod
def type(self) -> str:
raise NotImplementedError
@abc.abstractmethod