Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenpawley committed May 20, 2024
1 parent 9bf25b9 commit 5245e97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions pyspatialml/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ def __getitem__(self, key):
new = self.__dict__[key]
else:
selected = []

for i in key:
if i in self.names is False:
raise KeyError("key not present in Raster object")
else:
selected.append(self.__dict__[i])

new = Raster(selected)
return new

Expand Down
2 changes: 1 addition & 1 deletion tests/test_band_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TestNames(TestCase):
contains band names
"""
def setUp(self) -> None:
"""Create a temperory file with a raster dataset with band names
"""Create a temporary file with a raster dataset with band names
"""
with rasterio.open(nc.multiband) as src:
self.descriptions = ["band_1", "band_2", "band_3", "band_4", "band_5"]
Expand Down

0 comments on commit 5245e97

Please sign in to comment.