From 3d420aa641ac525eb3fbe5101b1f4456d018bcf0 Mon Sep 17 00:00:00 2001 From: slowy07 Date: Tue, 19 Nov 2024 16:02:20 +0700 Subject: [PATCH] fix(warning): unused variable `e` and bare exceptions Signed-off-by: slowy07 --- leafmap/bokehmap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leafmap/bokehmap.py b/leafmap/bokehmap.py index b259f03f83..8be63d20c8 100644 --- a/leafmap/bokehmap.py +++ b/leafmap/bokehmap.py @@ -90,7 +90,7 @@ def __init__( if basemap == "OpenStreetMap": try: fig.add_tile(xyz.OpenStreetMap.Mapnik, retina=True) - except: + except Exception: from bokeh.tile_providers import get_provider fig.add_tile(get_provider(xyz.OpenStreetMap.Mapnik)) @@ -165,7 +165,7 @@ def add_tile(self, tile: str, **kwargs) -> None: """ try: self.figure.add_tile(tile, **kwargs) - except Exception as e: + except Exception: if "retina" in kwargs.keys(): kwargs.pop("retina") self.figure.add_tile(tile, **kwargs)