From 57a9f3257880138c578c6b36207768f56877c1c9 Mon Sep 17 00:00:00 2001 From: Kernc Date: Sun, 27 Nov 2022 04:35:54 +0100 Subject: [PATCH] TYP: Fix mypy .991 bokeh errors --- backtesting/_plotting.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backtesting/_plotting.py b/backtesting/_plotting.py index c5cc8c20..5b89fc58 100644 --- a/backtesting/_plotting.py +++ b/backtesting/_plotting.py @@ -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, @@ -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 @@ -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: @@ -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 @@ -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',