Skip to content

Commit

Permalink
Prefer Optional over Union with None for consistency in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 committed Feb 6, 2024
1 parent 71fb424 commit 48c8870
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions earthaccess/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .utils import _validation as validate


def _normalize_location(location: Union[str, None]) -> Union[str, None]:
def _normalize_location(location: Optional[str]) -> Optional[str]:
"""Handle user-provided `daac` and `provider` values
These values must have a capital letter as the first character
Expand Down Expand Up @@ -160,7 +160,7 @@ def login(strategy: str = "all", persist: bool = False) -> Auth:

def download(
granules: Union[DataGranule, List[DataGranule], str, List[str]],
local_path: Union[str, None],
local_path: Optional[str],
provider: Optional[str] = None,
threads: int = 8,
) -> List[str]:
Expand Down

0 comments on commit 48c8870

Please sign in to comment.