Skip to content

Commit e5aa56d

Browse files
committed
add __repr__ for DataGranules
1 parent dae6435 commit e5aa56d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

earthaccess/search.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,5 +980,8 @@ def __eq__(self, other: 'DataGranules'):
980980

981981
# TODO: display methods
982982
def __repr__(self):
983-
reprs = ", ".join([granule.__repr__() for granule in self.granules])
984-
return f'DataGranules([{reprs}])'
983+
984+
if (count := len(self)) > 0:
985+
return f'DataGranules().parameters({self.params}).load({count})'
986+
987+
return f'DataGranules().parameters({self.params})'

0 commit comments

Comments
 (0)