Skip to content

Commit b47eb05

Browse files
committed
Remove direct bokeh.plotting import
1 parent 25c4a6b commit b47eb05

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

panel/tests/test_imports.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_no_blocklist_imports():
99
import sys
1010
import panel
1111
12-
blocklist = {"pandas"}
12+
blocklist = {"pandas", "bokeh.plotting"}
1313
mods = blocklist & set(sys.modules)
1414
1515
if mods:

panel/widgets/indicators.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import param
3333

3434
from bokeh.models import ColumnDataSource, FixedTicker, Tooltip
35-
from bokeh.plotting import figure
3635

3736
from .._param import Align
3837
from ..io.resources import CDN_DIST
@@ -737,6 +736,7 @@ def _get_data(self, properties):
737736
return annulus_data, needle_data, threshold_data, text_data
738737

739738
def _get_model(self, doc, root=None, parent=None, comm=None):
739+
from bokeh.plotting import figure
740740
properties = self._get_properties(doc)
741741
model = figure(
742742
x_range=(-1,1), y_range=(-1,1), tools=[],
@@ -953,6 +953,8 @@ def _get_data(self, properties):
953953
)
954954

955955
def _get_model(self, doc, root=None, parent=None, comm=None):
956+
from bokeh.plotting import figure
957+
956958
params = self._get_properties(doc)
957959
model = figure(
958960
outline_line_color=None, toolbar_location=None, tools=[],

0 commit comments

Comments
 (0)