Add python syntax check (#8651)
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled

* Add python syntax check

* Fix some python regression algorithms

* Fixing more bugs
This commit is contained in:
Martin-Molinero
2025-03-28 10:36:26 -03:00
committed by GitHub
parent 581e87809b
commit 513ced31d7
155 changed files with 667 additions and 587 deletions
@@ -30,16 +30,16 @@ class ForwardDataOnlyFillModelAlgorithm(QCAlgorithm):
def trade(self):
if not self.portfolio.invested:
if self.time.hour != 9 or self.time.minute != 30:
raise Exception(f"Unexpected event time {self.time}")
raise AssertionError(f"Unexpected event time {self.time}")
ticket = self.buy("SPY", 1)
if ticket.status != OrderStatus.SUBMITTED:
raise Exception(f"Unexpected order status {ticket.status}")
raise AssertionError(f"Unexpected order status {ticket.status}")
def on_order_event(self, order_event: OrderEvent):
self.debug(f"OnOrderEvent:: {order_event}")
if order_event.status == OrderStatus.FILLED and (self.time.hour != 10 or self.time.minute != 0):
raise Exception(f"Unexpected fill time {self.time}")
raise AssertionError(f"Unexpected fill time {self.time}")
class ForwardDataOnlyFillModel(EquityFillModel):
def fill(self, parameters: FillModelParameters):