Skip to content

Commit

Permalink
Pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
robbibt committed Jan 23, 2024
1 parent 5f2bb5b commit 096377d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions odc/geo/_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def explore(

# Update any supplied kwargs with custom params
map_kwds = {} if map_kwds is None else map_kwds
kwargs.update(cmap=cmap, vmin=vmin, vmax=vmax, robust=robust)
kwargs.update(cmap=cmap, vmin=vmin, vmax=vmax, robust=robust, resampling=resampling)
map_kwds.update(tiles=tiles, attr=attr)

# If input is a dataset, convert to an RGBA array
Expand All @@ -258,12 +258,11 @@ def explore(
except ValueError as e:
if "Must specify clamp" in str(e):
raise e
else:
ValueError(
f"Unable to automatically guess RGB colours ({e}). "
f"Manually specify bands to plot using the `bands` "
"parameter, e.g. `ds.odc.explore(bands=['a', 'b', 'c'])`"
)
raise ValueError(
f"Unable to automatically guess RGB colours ({e}). "
f"Manually specify bands to plot using the `bands` "
"parameter, e.g. `ds.odc.explore(bands=['a', 'b', 'c'])`"
) from e

# Create folium Map if required
if map is None:
Expand All @@ -272,7 +271,7 @@ def explore(
# Add to map and raise a friendly error if data has unsuitable dims
try:
xx.odc.add_to(map, **kwargs)
except ValueError as e:
except ValueError:
raise ValueError(
"Only 2D single-band (x, y) or 3D multi-band (x, y, band) "
"arrays are supported by `.explore()`. Please reduce the "
Expand Down

0 comments on commit 096377d

Please sign in to comment.