Merge pull request #2162 from lostleaf/master

[Fix] 修复 init_cli_trading 的 type hint
This commit is contained in:
vn.py 2019-10-29 13:37:41 +08:00 committed by GitHub
commit 0a1aa0fd81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
from typing import Sequence
from typing import Sequence, Type
from vnpy.event import EventEngine, Event
from vnpy.trader.engine import MainEngine
@ -14,7 +14,7 @@ def process_log_event(event: Event):
print(f"{log.time}\t{log.msg}")
def init_cli_trading(gateways: Sequence[BaseGateway]):
def init_cli_trading(gateways: Sequence[Type[BaseGateway]]):
""""""
event_engine = EventEngine()
event_engine.register(EVENT_LOG, process_log_event)