From 6d3305010dc0bde54760c4c11b7a3b8d4cc5d41e Mon Sep 17 00:00:00 2001 From: Bane Sullivan Date: Mon, 29 Jan 2024 18:08:30 -0800 Subject: [PATCH] Deprecate bands as well --- localtileserver/widgets.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/localtileserver/widgets.py b/localtileserver/widgets.py index a9345ea3..97a07f04 100644 --- a/localtileserver/widgets.py +++ b/localtileserver/widgets.py @@ -79,6 +79,11 @@ def get_leaflet_tile_layer( warnings.warn( "The `band` keyword argument is deprecated. Please use `indexes` instead.", ) + elif "bands" in kwargs: + indexes = kwargs.pop("bands") + warnings.warn( + "The `bands` keyword argument is deprecated. Please use `indexes` instead.", + ) if "cmap" in kwargs: colormap = kwargs.pop("cmap") warnings.warn( @@ -178,6 +183,11 @@ def get_folium_tile_layer( warnings.warn( "The `band` keyword argument is deprecated. Please use `indexes` instead.", ) + elif "bands" in kwargs: + indexes = kwargs.pop("bands") + warnings.warn( + "The `bands` keyword argument is deprecated. Please use `indexes` instead.", + ) if "cmap" in kwargs: colormap = kwargs.pop("cmap") warnings.warn(