Skip to content

Commit

Permalink
TYP: Fix mypy .991 bokeh errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Nov 27, 2022
1 parent 57e5251 commit 57a9f32
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backtesting/_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
tomato as BEAR_COLOR
)
from bokeh.plotting import figure as _figure
from bokeh.models import (
from bokeh.models import ( # type: ignore
CrosshairTool,
CustomJS,
ColumnDataSource,
Expand Down Expand Up @@ -625,7 +625,7 @@ def __eq__(self, other):
if plot_volume:
custom_js_args.update(volume_range=fig_volume.y_range)

fig_ohlc.x_range.js_on_change('end', CustomJS(args=custom_js_args,
fig_ohlc.x_range.js_on_change('end', CustomJS(args=custom_js_args, # type: ignore
code=_AUTOSCALE_JS_CALLBACK))

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

f.add_tools(linked_crosshair)
wheelzoom_tool = next(wz for wz in f.tools if isinstance(wz, WheelZoomTool))
wheelzoom_tool.maintain_focus = False
wheelzoom_tool.maintain_focus = False # type: ignore

kwargs = {}
if plot_width is None:
Expand All @@ -662,7 +662,7 @@ def __eq__(self, other):
toolbar_location='right',
toolbar_options=dict(logo=None),
merge_tools=True,
**kwargs
**kwargs # type: ignore
)
show(fig, browser=None if open_browser else 'none')
return fig
Expand Down Expand Up @@ -719,7 +719,7 @@ def plot_heatmaps(heatmap: pd.Series, agg: Union[Callable, str], ncols: int,
plots.append(fig)

fig = gridplot(
plots,
plots, # type: ignore
ncols=ncols,
toolbar_options=dict(logo=None),
toolbar_location='above',
Expand Down

0 comments on commit 57a9f32

Please sign in to comment.