修正 MainEngine 中 app_class, gateway_class 的 type hint

This commit is contained in:
lostleaf 2019-07-17 10:40:47 +08:00
parent 91ae57b850
commit f5469e5158

View File

@ -9,7 +9,7 @@ from datetime import datetime
from email.message import EmailMessage from email.message import EmailMessage
from queue import Empty, Queue from queue import Empty, Queue
from threading import Thread from threading import Thread
from typing import Any, Sequence from typing import Any, Sequence, Type
from vnpy.event import Event, EventEngine from vnpy.event import Event, EventEngine
from .app import BaseApp from .app import BaseApp
@ -63,7 +63,7 @@ class MainEngine:
self.engines[engine.engine_name] = engine self.engines[engine.engine_name] = engine
return engine return engine
def add_gateway(self, gateway_class: BaseGateway): def add_gateway(self, gateway_class: Type[BaseGateway]):
""" """
Add gateway. Add gateway.
""" """
@ -77,7 +77,7 @@ class MainEngine:
return gateway return gateway
def add_app(self, app_class: BaseApp): def add_app(self, app_class: Type[BaseApp]):
""" """
Add app. Add app.
""" """