Merge pull request #1833 from nanoric/dev

[Mod] support for PyQt5>=5.12 is satisfied
This commit is contained in:
vn.py 2019-06-14 22:08:34 +08:00 committed by GitHub
commit 961f7366a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
PyQt5<5.12
PyQt5
pyqtgraph
dataclasses; python_version<="3.6"
qdarkstyle

View File

@ -117,7 +117,7 @@ def is_psycopg2_exists():
install_requires = [
"PyQt5<5.12",
"PyQt5",
"qdarkstyle",
"requests",
"websocket-client",

View File

@ -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()

View File

@ -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()