Skip to content

Commit

Permalink
Make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau committed Dec 4, 2023
1 parent 9753842 commit 4de8af6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions earthaccess/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from itertools import chain
from pathlib import Path
from pickle import dumps, loads
from typing import Any, Dict, List, Optional, Tuple, Union
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from uuid import uuid4

import fsspec
Expand Down Expand Up @@ -44,7 +44,7 @@ def __repr__(self) -> str:


def _open_files(
url_mapping: dict[str, Union[DataGranule, None]],
url_mapping: Mapping[str, Union[DataGranule, None]],
fs: fsspec.AbstractFileSystem,
threads: Optional[int] = 8,
) -> List[fsspec.AbstractFileSystem]:
Expand Down Expand Up @@ -78,7 +78,7 @@ def make_instance(

def _get_url_granule_mapping(
granules: List[DataGranule], access: str
) -> Dict[str, DataGranule]:
) -> Mapping[str, DataGranule]:
"""Construct a mapping between file urls and granules"""
url_mapping = {}
for granule in granules:
Expand Down Expand Up @@ -392,7 +392,7 @@ def _open_urls(
"A valid Earthdata login instance is required to retrieve S3 credentials"
)

url_mapping = {url: None for url in granules}
url_mapping: Mapping[str, None] = {url: None for url in granules}
if self.running_in_aws and granules[0].startswith("s3"):
if provider is not None:
s3_fs = self.get_s3fs_session(provider=provider)
Expand Down Expand Up @@ -626,7 +626,7 @@ def _download_onprem_granules(

def _open_urls_https(
self,
url_mapping: Dict[str, Union[DataGranule, None]],
url_mapping: Mapping[str, Union[DataGranule, None]],
threads: Optional[int] = 8,
) -> List[fsspec.AbstractFileSystem]:
https_fs = self.get_fsspec_session()
Expand Down

0 comments on commit 4de8af6

Please sign in to comment.