Skip to content

Commit

Permalink
Fix style tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Jan 28, 2025
1 parent aff5aaa commit 4080d03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions tests/datasets/test_ssl4eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ def test_getitem(self, dataset: SSL4EOL) -> None:
x = dataset[0]
assert isinstance(x, dict)
assert isinstance(x['image'], torch.Tensor)
assert (
x['image'].size(0)
== dataset.seasons * len(dataset.metadata[dataset.split]['all_bands'])
assert x['image'].size(0) == dataset.seasons * len(
dataset.metadata[dataset.split]['all_bands']
)

def test_len(self, dataset: SSL4EOL) -> None:
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/ssl4eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def __init__(
self._verify()

if split.startswith('tm'):
base = Landsat5TM
base: type[Landsat] = Landsat5TM
elif split.startswith('etm'):
base = Landsat7
else:
Expand Down

0 comments on commit 4080d03

Please sign in to comment.