Skip to content

Commit

Permalink
restore AbstractBaseClass inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
itcarroll authored Oct 1, 2024
1 parent 412e947 commit 5de13bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions earthaccess/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 5de13bf

Please sign in to comment.