Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Dec 21, 2023
1 parent 503d880 commit 87faf33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hvplot/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,20 +309,20 @@ class Geographic(Controls):
_widgets_kwargs = {'geo': {'type': pn.widgets.Toggle}}

def __init__(self, data, **params):
self._gv_available = False
gv_available = False
try:
import geoviews # noqa
self._gv_available = True
gv_available = True
except ImportError:
pass

geo_params = GEO_KEYS + ['geo']
if not self._gv_available and any(p in params for p in geo_params):
if not gv_available and any(p in params for p in geo_params):
raise ImportError(
'GeoViews must be installed to enable the geographic options.'
)
super().__init__(data, **params)
if not self._gv_available:
if not gv_available:
for p in geo_params:
self.param[p].constant = True
# Workaround: Checkbox widgets don't yet have a tooltip
Expand Down

0 comments on commit 87faf33

Please sign in to comment.