Skip to content

Commit

Permalink
Fix lint issues kernc#382
Browse files Browse the repository at this point in the history
  • Loading branch information
zlpatel committed Jun 16, 2021
1 parent 8c713d2 commit 15b3ff7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion backtesting/_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,8 @@ def __eq__(self, other):
if is_overlay:
ohlc_tooltips.append((indicator_name, NBSP.join(tooltips)))
else:
set_tooltips(fig, [(indicator_name, NBSP.join(tooltips))], vline=True, renderers=[r])
set_tooltips(fig, [(indicator_name, NBSP.join(tooltips))],
vline=True, renderers=[r])
# If the sole indicator line on this figure,
# have the legend only contain text without the glyph
if len(value) == 1:
Expand Down
6 changes: 3 additions & 3 deletions backtesting/test/_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,9 @@ def next(self):
def test_indicator_legends(self):
class S(Strategy):
def init(self):
self.I(lambda:(SMA(self.data.Close, 5),SMA(self.data.Close, 10)), overlay=True,
scatter=False, legends=['SMA 5','SMA 10'])
self.I(lambda: (SMA(self.data.Close, 5), SMA(self.data.Close, 10)), overlay=False,
name='Simple Moving Averages', scatter=False, legends=['SMA 5','SMA 10'])

def next(self):
pass

Expand Down

0 comments on commit 15b3ff7

Please sign in to comment.