Skip to content

Commit

Permalink
Remove direct bokeh.plotting import
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Sep 2, 2024
1 parent 25c4a6b commit b47eb05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion panel/tests/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_no_blocklist_imports():
import sys
import panel
blocklist = {"pandas"}
blocklist = {"pandas", "bokeh.plotting"}
mods = blocklist & set(sys.modules)
if mods:
Expand Down
4 changes: 3 additions & 1 deletion panel/widgets/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import param

from bokeh.models import ColumnDataSource, FixedTicker, Tooltip
from bokeh.plotting import figure

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

def _get_model(self, doc, root=None, parent=None, comm=None):
from bokeh.plotting import figure
properties = self._get_properties(doc)
model = figure(
x_range=(-1,1), y_range=(-1,1), tools=[],
Expand Down Expand Up @@ -953,6 +953,8 @@ def _get_data(self, properties):
)

def _get_model(self, doc, root=None, parent=None, comm=None):
from bokeh.plotting import figure

params = self._get_properties(doc)
model = figure(
outline_line_color=None, toolbar_location=None, tools=[],
Expand Down

0 comments on commit b47eb05

Please sign in to comment.