Skip to content

Commit

Permalink
REF: Fix mypy v0.920 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Dec 18, 2021
1 parent 0107d4a commit 94d20da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backtesting/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def func(x, *_, **__):
series = series.s

if agg is None:
agg = OHLCV_AGG.get(getattr(series, 'name', None), 'last')
agg = OHLCV_AGG.get(getattr(series, 'name', ''), 'last')
if isinstance(series, pd.DataFrame):
agg = {column: OHLCV_AGG.get(column, 'last')
for column in series.columns}
Expand Down

0 comments on commit 94d20da

Please sign in to comment.