Skip to content

Commit

Permalink
Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nikki-t committed Jun 11, 2024
1 parent d1bebe3 commit 0e505ae
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
6 changes: 2 additions & 4 deletions earthaccess/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,9 @@ def s3_bucket(self) -> Dict[str, Any]:
return {}

def services(self) -> Dict[Any, List[Dict[str, Any]]]:
"""Returns:
A list of services available for the collection.
"""
Returns:
A list of services available for the collection.
"""

services = self.get("meta", {}).get("associations", {}).get("services", [])

parsed = {}
Expand Down
4 changes: 1 addition & 3 deletions earthaccess/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def __init__(self, auth: Optional[Auth] = None, *args: Any, **kwargs: Any) -> No
Parameters:
auth (Optional[Auth], optional): An authenticated `Auth` instance.
"""

super().__init__(*args, **kwargs)
self._debug = False
self.session = session()
Expand All @@ -39,8 +38,7 @@ def get(self, limit: int = 2000) -> List:
Parameters
limit (int): The number of results to return
Returns
Returns:
Query results as a list
"""

return search.get_results(self.session, self, limit)
4 changes: 1 addition & 3 deletions earthaccess/utils/_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ def get_results(
query: Union[CollectionQuery, GranuleQuery, ServiceQuery],
limit: int = 2000,
) -> List[Any]:
"""
Get all results up to some limit, even if spanning multiple pages.
"""Get all results up to some limit, even if spanning multiple pages.
???+ Tip
The default page size is 2000, if the supplied value is greater then the
Expand All @@ -26,7 +25,6 @@ def get_results(
Raises:
RuntimeError: The CMR query failed.
"""

page_size = min(limit, 2000)
url = query._build_url()

Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def _get_vcr(self, **kwargs):

def test_services(self):
"""Test that a list of services can be retrieved."""

datasets = search_datasets(
short_name="MUR-JPL-L4-GLOB-v4.1",
cloud_hosted=True,
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def _get_vcr(self, **kwargs):

def test_services(self):
"""Test DataService get function return of service metadata results."""

query = earthaccess.services.DataService().parameters(
concept_id="S2004184019-POCLOUD"
)
Expand Down Expand Up @@ -59,7 +58,6 @@ def test_services(self):

def test_service_results(self):
"""Test results.DataCollection.services to return available services."""

datasets = search_datasets(
short_name="MUR-JPL-L4-GLOB-v4.1",
cloud_hosted=True,
Expand Down

0 comments on commit 0e505ae

Please sign in to comment.