Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Chuck Daniels <chuck@developmentseed.org>
  • Loading branch information
frankinspace and chuckwondo committed Sep 13, 2024
1 parent 12eace4 commit 1f8b81a
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions cmr/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ def online_only(self, online_only: bool = True) -> Self:
return self

def _format_date(
self,
date_from: Optional[DateLike],
date_to: Optional[DateLike]
self,
date_from: Optional[DateLike],
date_to: Optional[DateLike]
) -> Tuple[str, str]:
"""
Format dates into expected format for date queries.
Expand Down Expand Up @@ -446,10 +446,10 @@ def convert_to_string(date: Optional[DateLike], default: datetime) -> str:
return date_from, date_to

def revision_date(
self,
date_from: Optional[DateLike],
date_to: Optional[DateLike],
exclude_boundary: bool = False,
self,
date_from: Optional[DateLike],
date_to: Optional[DateLike],
exclude_boundary: bool = False,
) -> Self:
"""
Filter by an open or closed date range for a query that captures updated items.
Expand Down Expand Up @@ -479,10 +479,10 @@ def revision_date(
return self

def temporal(
self,
date_from: Optional[DateLike],
date_to: Optional[DateLike],
exclude_boundary: bool = False,
self,
date_from: Optional[DateLike],
date_to: Optional[DateLike],
exclude_boundary: bool = False,
) -> Self:
"""
Filter by an open or closed date range for a temporal query.
Expand Down Expand Up @@ -622,11 +622,11 @@ def polygon(self, coordinates: Sequence[PointLike]) -> Self:
return self

def bounding_box(
self,
lower_left_lon: FloatLike,
lower_left_lat: FloatLike,
upper_right_lon: FloatLike,
upper_right_lat: FloatLike,
self,
lower_left_lon: FloatLike,
lower_left_lat: FloatLike,
upper_right_lon: FloatLike,
upper_right_lat: FloatLike,
) -> Self:
"""
Filter by granules that overlap a bounding box. Must be used in combination with
Expand Down Expand Up @@ -742,7 +742,7 @@ def __init__(self, mode: str = CMR_OPS):
self.concept_id_chars = {"G", "C"}

def orbit_number(
self, orbit1: FloatLike, orbit2: Optional[FloatLike] = None
self, orbit1: FloatLike, orbit2: Optional[FloatLike] = None
) -> Self:
""" "
Filter by the orbit number the granule was acquired during. Either a single
Expand Down Expand Up @@ -892,7 +892,7 @@ def granule_ur(self, granule_ur: str) -> Self:
return self

def readable_granule_name(
self, readable_granule_name: Union[str, Sequence[str]]
self, readable_granule_name: Union[str, Sequence[str]]
) -> Self:
"""
Filter by the readable granule name (producer_granule_id if present, otherwise producer_granule_id).
Expand Down

0 comments on commit 1f8b81a

Please sign in to comment.