From 5de13bf9b7d2a8dbe47e4527bf28cfabc60bf779 Mon Sep 17 00:00:00 2001 From: Ian Carroll Date: Tue, 1 Oct 2024 13:24:40 -0400 Subject: [PATCH] restore AbstractBaseClass inheritance --- earthaccess/store.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/earthaccess/store.py b/earthaccess/store.py index 61437542..84d61c4b 100644 --- a/earthaccess/store.py +++ b/earthaccess/store.py @@ -26,7 +26,7 @@ logger = logging.getLogger(__name__) -class EarthAccessFile: +class EarthAccessFile(fsspec.spec.AbstractBaseFile): """Handle for a file-like object pointing to an on-prem or Earthdata Cloud granule.""" def __init__( @@ -64,7 +64,7 @@ def _open_files( url_mapping: Mapping[str, Union[DataGranule, None]], fs: fsspec.AbstractFileSystem, threads: Optional[int] = 8, -) -> List[EarthAccessFile]: +) -> List[fsspec.spec.AbstractBaseFile]: def multi_thread_open(data: tuple) -> EarthAccessFile: urls, granule = data return EarthAccessFile(fs.open(urls), granule) @@ -336,7 +336,7 @@ def open( self, granules: Union[List[str], List[DataGranule]], provider: Optional[str] = None, - ) -> List[EarthAccessFile]: + ) -> List[fsspec.spec.AbstractBaseFile]: """Returns a list of file-like objects that can be used to access files hosted on S3 or HTTPS by third party libraries like xarray.