From f5469e5158ab9a6bd55e962f73f40a9b31f483ea Mon Sep 17 00:00:00 2001 From: lostleaf Date: Wed, 17 Jul 2019 10:40:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20MainEngine=20=E4=B8=AD=20a?= =?UTF-8?q?pp=5Fclass,=20gateway=5Fclass=20=E7=9A=84=20type=20hint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/engine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vnpy/trader/engine.py b/vnpy/trader/engine.py index 79fa1634..b21b12c6 100644 --- a/vnpy/trader/engine.py +++ b/vnpy/trader/engine.py @@ -9,7 +9,7 @@ from datetime import datetime from email.message import EmailMessage from queue import Empty, Queue from threading import Thread -from typing import Any, Sequence +from typing import Any, Sequence, Type from vnpy.event import Event, EventEngine from .app import BaseApp @@ -63,7 +63,7 @@ class MainEngine: self.engines[engine.engine_name] = engine return engine - def add_gateway(self, gateway_class: BaseGateway): + def add_gateway(self, gateway_class: Type[BaseGateway]): """ Add gateway. """ @@ -77,7 +77,7 @@ class MainEngine: return gateway - def add_app(self, app_class: BaseApp): + def add_app(self, app_class: Type[BaseApp]): """ Add app. """