mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 08:16:54 +08:00
Remove length check in favour of truthiness of the object
Signed-off-by: shubhendra <withshubh@gmail.com>
This commit is contained in:
@@ -93,7 +93,7 @@ class Exchange:
|
|||||||
self.limit_threshold = limit_threshold
|
self.limit_threshold = limit_threshold
|
||||||
# TODO: the quote, trade_dates, codes are not necessray.
|
# TODO: the quote, trade_dates, codes are not necessray.
|
||||||
# It is just for performance consideration.
|
# It is just for performance consideration.
|
||||||
if trade_dates is not None and len(trade_dates):
|
if trade_dates is not None and trade_dates:
|
||||||
start_date, end_date = trade_dates[0], trade_dates[-1]
|
start_date, end_date = trade_dates[0], trade_dates[-1]
|
||||||
else:
|
else:
|
||||||
self.logger.warning("trade_dates have not been assigned, all dates will be loaded")
|
self.logger.warning("trade_dates have not been assigned, all dates will be loaded")
|
||||||
|
|||||||
Reference in New Issue
Block a user