diff --git a/requirements.txt b/requirements.txt index 329526e3..d03113c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -PyQt5<5.12 +PyQt5 pyqtgraph dataclasses; python_version<="3.6" qdarkstyle diff --git a/setup.py b/setup.py index e73de0ef..92322699 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def is_psycopg2_exists(): install_requires = [ - "PyQt5<5.12", + "PyQt5", "qdarkstyle", "requests", "websocket-client", diff --git a/vnpy/trader/database/database_mongo.py b/vnpy/trader/database/database_mongo.py index 333f54ca..e8509478 100644 --- a/vnpy/trader/database/database_mongo.py +++ b/vnpy/trader/database/database_mongo.py @@ -326,8 +326,8 @@ class MongoManager(BaseDatabaseManager): ) -> Optional["BarData"]: s = ( DbBarData.objects(symbol=symbol, exchange=exchange.value) - .order_by("-datetime") - .first() + .order_by("-datetime") + .first() ) if s: return s.to_bar() @@ -338,8 +338,8 @@ class MongoManager(BaseDatabaseManager): ) -> Optional["TickData"]: s = ( DbTickData.objects(symbol=symbol, exchange=exchange.value) - .order_by("-datetime") - .first() + .order_by("-datetime") + .first() ) if s: return s.to_tick() diff --git a/vnpy/trader/database/database_sql.py b/vnpy/trader/database/database_sql.py index d3ad3c12..014c298a 100644 --- a/vnpy/trader/database/database_sql.py +++ b/vnpy/trader/database/database_sql.py @@ -346,7 +346,7 @@ class SqlManager(BaseDatabaseManager): & (self.class_bar.datetime >= start) & (self.class_bar.datetime <= end) ) - .order_by(self.class_bar.datetime) + .order_by(self.class_bar.datetime) ) data = [db_bar.to_bar() for db_bar in s] return data @@ -362,7 +362,7 @@ class SqlManager(BaseDatabaseManager): & (self.class_tick.datetime >= start) & (self.class_tick.datetime <= end) ) - .order_by(self.class_tick.datetime) + .order_by(self.class_tick.datetime) ) data = [db_tick.to_tick() for db_tick in s] @@ -386,8 +386,8 @@ class SqlManager(BaseDatabaseManager): & (self.class_bar.exchange == exchange.value) & (self.class_bar.interval == interval.value) ) - .order_by(self.class_bar.datetime.desc()) - .first() + .order_by(self.class_bar.datetime.desc()) + .first() ) if s: return s.to_bar() @@ -402,8 +402,8 @@ class SqlManager(BaseDatabaseManager): (self.class_tick.symbol == symbol) & (self.class_tick.exchange == exchange.value) ) - .order_by(self.class_tick.datetime.desc()) - .first() + .order_by(self.class_tick.datetime.desc()) + .first() ) if s: return s.to_tick()