Skip to content

Commit

Permalink
Use Python 3.9-compatible annotation style
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 committed Sep 5, 2024
1 parent 9604491 commit ca3f553
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions icepyx/core/APIformatting.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Generate and format information for submitting to API (CMR and NSIDC)."""

import datetime as dt
from typing import Any, Generic, Literal, TypeVar, Union, overload
from typing import Any, Generic, Literal, Optional, TypeVar, Union, overload

from icepyx.core.types import (
CMRParams,
Expand Down Expand Up @@ -256,14 +256,15 @@ class Parameters(Generic[T]):
"""

partype: T
_reqtype: Literal["search", "download"] | None
_reqtype: Optional[Literal["search", "download"]]
fmted_keys = _FmtedKeysDescriptor()
# _fmted_keys: Union[CMRParams, EGISpecificRequiredParams, EGIParamsSubset]

def __init__(
self,
partype: T,
values: dict | None = None,
reqtype: Literal["search", "download"] | None = None,
values: Optional[dict] = None,
reqtype: Optional[Literal["search", "download"]] = None,
):
assert partype in [
"CMR",
Expand Down

0 comments on commit ca3f553

Please sign in to comment.