Skip to content

Commit 57a9f32

Browse files
committed
TYP: Fix mypy .991 bokeh errors
1 parent 57e5251 commit 57a9f32

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

backtesting/_plotting.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
tomato as BEAR_COLOR
1717
)
1818
from bokeh.plotting import figure as _figure
19-
from bokeh.models import (
19+
from bokeh.models import ( # type: ignore
2020
CrosshairTool,
2121
CustomJS,
2222
ColumnDataSource,
@@ -625,7 +625,7 @@ def __eq__(self, other):
625625
if plot_volume:
626626
custom_js_args.update(volume_range=fig_volume.y_range)
627627

628-
fig_ohlc.x_range.js_on_change('end', CustomJS(args=custom_js_args,
628+
fig_ohlc.x_range.js_on_change('end', CustomJS(args=custom_js_args, # type: ignore
629629
code=_AUTOSCALE_JS_CALLBACK))
630630

631631
plots = figs_above_ohlc + [fig_ohlc] + figs_below_ohlc
@@ -650,7 +650,7 @@ def __eq__(self, other):
650650

651651
f.add_tools(linked_crosshair)
652652
wheelzoom_tool = next(wz for wz in f.tools if isinstance(wz, WheelZoomTool))
653-
wheelzoom_tool.maintain_focus = False
653+
wheelzoom_tool.maintain_focus = False # type: ignore
654654

655655
kwargs = {}
656656
if plot_width is None:
@@ -662,7 +662,7 @@ def __eq__(self, other):
662662
toolbar_location='right',
663663
toolbar_options=dict(logo=None),
664664
merge_tools=True,
665-
**kwargs
665+
**kwargs # type: ignore
666666
)
667667
show(fig, browser=None if open_browser else 'none')
668668
return fig
@@ -719,7 +719,7 @@ def plot_heatmaps(heatmap: pd.Series, agg: Union[Callable, str], ncols: int,
719719
plots.append(fig)
720720

721721
fig = gridplot(
722-
plots,
722+
plots, # type: ignore
723723
ncols=ncols,
724724
toolbar_options=dict(logo=None),
725725
toolbar_location='above',

0 commit comments

Comments
 (0)