convert_backtestdata: flake8 fixes
This commit is contained in:
parent
de8db9293c
commit
53e76a89ac
@ -69,7 +69,7 @@ def parse_old_backtest_data(ticker) -> DataFrame:
|
||||
.rename(columns=columns)
|
||||
if 'BV' in frame:
|
||||
frame.drop('BV', 1, inplace=True)
|
||||
if not 'date' in frame:
|
||||
if 'date' not in frame:
|
||||
logger.warning("Date not in frame - probably not a Ticker file")
|
||||
return None
|
||||
frame.sort_values('date', inplace=True)
|
||||
@ -136,7 +136,8 @@ def convert_main(args: Namespace) -> None:
|
||||
|
||||
if ret_integer:
|
||||
minutes = int(ret_integer.group(0))
|
||||
interval = str(minutes) + 'm' # default to adding 'm' to end of minutes for new interval name
|
||||
# default to adding 'm' to end of minutes for new interval name
|
||||
interval = str(minutes) + 'm'
|
||||
# but check if there is a mapping between int and string also
|
||||
for str_interval, minutes_interval in Constants.TICKER_INTERVAL_MINUTES.items():
|
||||
if minutes_interval == minutes:
|
||||
|
Loading…
Reference in New Issue
Block a user