mirror of
https://github.com/star-inc/star_yuuki_bot.git
synced 2024-09-20 06:46:17 +08:00
Thanks for PEP 563, it helps Yuuki getting type hints, but raising the the demand of Python interpreter version to 3.7.
This commit is contained in:
parent
0f77e7b16e
commit
fca26141af
|
@ -6,11 +6,16 @@ This Source Code Form is subject to the terms of the Mozilla Public
|
|||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from thrift.protocol import TCompactProtocol
|
||||
from thrift.transport import THttpClient
|
||||
from yuuki_core.TalkService import Client, TalkException
|
||||
|
||||
from .config import YuukiConfig
|
||||
if TYPE_CHECKING:
|
||||
from .config import YuukiConfig
|
||||
|
||||
# NC HighSpeed Library
|
||||
try:
|
||||
|
|
|
@ -6,12 +6,17 @@ This Source Code Form is subject to the terms of the Mozilla Public
|
|||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import time
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from yuuki_core.ttypes import ContentType
|
||||
|
||||
from ..tools import YuukiDynamicTools
|
||||
from ..yuuki import Yuuki
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..yuuki import Yuuki
|
||||
|
||||
|
||||
class YuukiCallback:
|
||||
|
|
|
@ -6,14 +6,18 @@ This Source Code Form is subject to the terms of the Mozilla Public
|
|||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import time
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from yuuki_core.ttypes import MIDType, ContentType, OpType
|
||||
|
||||
from ..tools import YuukiStaticTools, YuukiDynamicTools
|
||||
from ..yuuki import Yuuki
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..yuuki import Yuuki
|
||||
|
||||
|
||||
class YuukiCommand:
|
||||
|
|
|
@ -6,10 +6,14 @@ This Source Code Form is subject to the terms of the Mozilla Public
|
|||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from ..tools import YuukiStaticTools, YuukiDynamicTools
|
||||
|
||||
from ..yuuki import Yuuki
|
||||
if TYPE_CHECKING:
|
||||
from ..yuuki import Yuuki
|
||||
|
||||
|
||||
class YuukiJoinGroup:
|
||||
|
|
|
@ -6,11 +6,16 @@ This Source Code Form is subject to the terms of the Mozilla Public
|
|||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from yuuki_core.ttypes import OpType
|
||||
|
||||
from ..tools import YuukiStaticTools, YuukiDynamicTools
|
||||
from ..yuuki import Yuuki
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..yuuki import Yuuki
|
||||
|
||||
|
||||
def security_access_checker(function):
|
||||
|
|
|
@ -6,13 +6,18 @@ This Source Code Form is subject to the terms of the Mozilla Public
|
|||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import socket
|
||||
import time
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from yuuki_core.ttypes import Operation
|
||||
|
||||
from .tools import YuukiStaticTools, YuukiDynamicTools
|
||||
from .yuuki import Yuuki
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .yuuki import Yuuki
|
||||
|
||||
|
||||
class YuukiPoll:
|
||||
|
|
|
@ -6,17 +6,21 @@ This Source Code Form is subject to the terms of the Mozilla Public
|
|||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import ntpath
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
import traceback
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import requests
|
||||
from yuuki_core.ttypes import OpType, MIDType, ContentType, Group, Message
|
||||
|
||||
from .yuuki import Yuuki
|
||||
if TYPE_CHECKING:
|
||||
from .yuuki import Yuuki
|
||||
|
||||
|
||||
class YuukiStaticTools:
|
||||
|
|
|
@ -18,15 +18,13 @@ from flask_bootstrap import Bootstrap
|
|||
from gevent.pywsgi import WSGIServer
|
||||
|
||||
from .reader import YuukiWebDataReader
|
||||
from ..data import YuukiData
|
||||
from ..tools import YuukiDynamicTools
|
||||
from ..yuuki import Yuuki
|
||||
|
||||
wa_app = Flask(__name__)
|
||||
|
||||
Yuuki_Handle = Yuuki
|
||||
Yuuki_Handle_Data = YuukiData
|
||||
Yuuki_APIHandle_Data = YuukiWebDataReader
|
||||
Yuuki_Handle = None
|
||||
Yuuki_Handle_Data = None
|
||||
Yuuki_APIHandle_Data = None
|
||||
|
||||
passports = []
|
||||
password = str(hash(random.random()))
|
||||
|
|
|
@ -6,16 +6,20 @@ This Source Code Form is subject to the terms of the Mozilla Public
|
|||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import platform
|
||||
import random
|
||||
import sys
|
||||
import time
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from git import Repo
|
||||
from yuuki_core.ttypes import OpType
|
||||
|
||||
from .config import YuukiConfig
|
||||
if TYPE_CHECKING:
|
||||
from .config import YuukiConfig
|
||||
from .connection import YuukiConnect
|
||||
from .data import YuukiData
|
||||
from .events import YuukiCommand, YuukiJoinGroup, YuukiSecurity, YuukiCallback
|
||||
|
|
Loading…
Reference in a new issue