Merge pull request #1833 from nanoric/dev
[Mod] support for PyQt5>=5.12 is satisfied
This commit is contained in:
commit
961f7366a3
@ -1,4 +1,4 @@
|
||||
PyQt5<5.12
|
||||
PyQt5
|
||||
pyqtgraph
|
||||
dataclasses; python_version<="3.6"
|
||||
qdarkstyle
|
||||
|
2
setup.py
2
setup.py
@ -117,7 +117,7 @@ def is_psycopg2_exists():
|
||||
|
||||
|
||||
install_requires = [
|
||||
"PyQt5<5.12",
|
||||
"PyQt5",
|
||||
"qdarkstyle",
|
||||
"requests",
|
||||
"websocket-client",
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user