Fix some type hints
This commit is contained in:
parent
bc416d71c2
commit
13aaedfad9
@ -26,8 +26,9 @@ from mautrix.types import MessageType, EventType
|
|||||||
from ..matrix import MaubotMessageEvent
|
from ..matrix import MaubotMessageEvent
|
||||||
from . import event
|
from . import event
|
||||||
|
|
||||||
PrefixType = Optional[Union[str, Callable[[], str]]]
|
PrefixType = Optional[Union[str, Callable[[], str], Callable[[Any], str]]]
|
||||||
AliasesType = Union[List[str], Tuple[str, ...], Set[str], Callable[[str], bool]]
|
AliasesType = Union[List[str], Tuple[str, ...], Set[str], Callable[[str], bool],
|
||||||
|
Callable[[Any, str], bool]]
|
||||||
CommandHandlerFunc = NewType("CommandHandlerFunc",
|
CommandHandlerFunc = NewType("CommandHandlerFunc",
|
||||||
Callable[[MaubotMessageEvent, Any], Awaitable[Any]])
|
Callable[[MaubotMessageEvent, Any], Awaitable[Any]])
|
||||||
CommandHandlerDecorator = NewType("CommandHandlerDecorator",
|
CommandHandlerDecorator = NewType("CommandHandlerDecorator",
|
||||||
|
@ -30,6 +30,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
class Plugin(ABC):
|
class Plugin(ABC):
|
||||||
client: 'MaubotMatrixClient'
|
client: 'MaubotMatrixClient'
|
||||||
|
http: ClientSession
|
||||||
id: str
|
id: str
|
||||||
log: Logger
|
log: Logger
|
||||||
loop: AbstractEventLoop
|
loop: AbstractEventLoop
|
||||||
|
Loading…
Reference in New Issue
Block a user