Skip to content

Commit

Permalink
use literal instead
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Dec 16, 2024
1 parent df3192b commit 2d9a16e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/sweets/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
import zipfile
from concurrent.futures import ThreadPoolExecutor
from datetime import date, datetime
from enum import Enum
from functools import lru_cache
from pathlib import Path
from typing import Any, Optional
from typing import Any, Optional, Literal
from urllib.parse import urlencode

import requests
Expand All @@ -46,11 +45,6 @@
DIRNAME = os.path.dirname(os.path.abspath(__file__))


class FlightDirection(str, Enum):
ASCENDING = "ASCENDING"
DESCENDING = "DESCENDING"


class ASFQuery(YamlModel):
"""Class holding the Sentinel-1 ASF query parameters."""

Expand Down Expand Up @@ -89,7 +83,7 @@ class ASFQuery(YamlModel):
alias="relativeOrbit",
description="Path number",
)
flight_direction: Optional[FlightDirection] = Field(
flight_direction: Optional[Literal["ASCENDING", "DESCENDING"]] = Field(
None,
alias="flightDirection",
description="Direction of satellite during acquisition.",
Expand Down

0 comments on commit 2d9a16e

Please sign in to comment.