diff --git a/leafmap/common.py b/leafmap/common.py index bbc3d1f0ff..f4616b0607 100644 --- a/leafmap/common.py +++ b/leafmap/common.py @@ -6296,17 +6296,17 @@ def datasets_full(self) -> list: return [] @property - def prodFormats(self) -> list: + def prodFormats(self) -> set: """ Return all datatypes available in any of the collections. Note that "All" is only peculiar to one dataset. """ - return set(i["displayName"] for ds in self.DS for i in ds["formats"]) + return {i["displayName"] for ds in self.DS for i in ds.get("formats", [])} @property - def datasets(self) -> list: + def datasets(self) -> set: """ - Returns a list of dataset tags (most common human readable self description for specific datasets). + Returns a set of dataset tags (most common human readable self description for specific datasets). """ return set(y["sbDatasetTag"] for x in self.DS for y in x["tags"]) diff --git a/leafmap/leafmap.py b/leafmap/leafmap.py index 1fdd417563..112c6d6530 100644 --- a/leafmap/leafmap.py +++ b/leafmap/leafmap.py @@ -5585,7 +5585,7 @@ def _find_widget_of_type( return None def remove(self, widget: Any) -> None: - """Removes a widget to the map.""" + """Removes a widget from the map.""" basic_controls: Dict[str, ipyleaflet.Control] = { "layer_editor": map_widgets.LayerEditor,