把typevar这堆改回去(
This commit is contained in:
parent
fca6b38972
commit
fc60e5ad18
@ -1,5 +1,13 @@
|
||||
from typing import TYPE_CHECKING, TypeVar
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ica_typing import IcaNewMessage, IcaClient
|
||||
from ica_typing import TailchatReciveMessage, TailchatClient
|
||||
else:
|
||||
IcaNewMessage = TypeVar("NewMessage")
|
||||
IcaClient = TypeVar("IcaClient")
|
||||
TailchatReciveMessage = TypeVar("TailchatReciveMessage")
|
||||
TailchatClient = TypeVar("TailchatClient")
|
||||
|
||||
def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None:
|
||||
if not (msg.is_from_self or msg.is_reply):
|
||||
|
@ -4,9 +4,16 @@ import subprocess
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from typing import TYPE_CHECKING, TypeVar
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ica_typing import IcaNewMessage, IcaClient, ConfigData
|
||||
|
||||
CONFIG_DATA: ConfigData
|
||||
else:
|
||||
CONFIG_DATA = None # type: ignore
|
||||
IcaNewMessage = TypeVar("NewMessage")
|
||||
IcaClient = TypeVar("IcaClient")
|
||||
|
||||
_version_ = "0.4.2"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user