From 9d20287874b386a97de985fb066ae0371ddf9278 Mon Sep 17 00:00:00 2001 From: arfy slowy Date: Wed, 20 Nov 2024 01:17:43 +0700 Subject: [PATCH] fix(warning): unused variable `e` and bare exceptions (#990) 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)