Skip to content

Commit

Permalink
ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPlayer3 committed Dec 17, 2024
1 parent 3d544a4 commit 2b5f28e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions docs/sdk_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@
},
"outputs": [],
"source": [
"\n",
"\n",
"def get_nearest_neighbors(granule: str, max_neighbors: int | None = None) -> asf.ASFSearchResults:\n",
" granule = asf.granule_search(granule)[-1]\n",
" stack = reversed([item for item in granule.stack() if item.properties['temporalBaseline'] < 0])\n",
Expand Down
4 changes: 1 addition & 3 deletions src/hyp3_sdk/hyp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ def get_job_by_id(self, job_id: str) -> Job:
return Job.from_dict(response.json())

@singledispatchmethod
def watch(
self, job_or_batch: Batch | Job, timeout: int = 10800, interval: int | float = 60
) -> Batch | Job:
def watch(self, job_or_batch: Batch | Job, timeout: int = 10800, interval: int | float = 60) -> Batch | Job:
"""Watch jobs until they complete
Args:
Expand Down
6 changes: 2 additions & 4 deletions src/hyp3_sdk/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,14 @@ def _count_statuses(self):
return Counter([job.status_code for job in self.jobs])

def complete(self) -> bool:
"""Returns: True if all jobs are complete, otherwise returns False
"""
"""Returns: True if all jobs are complete, otherwise returns False"""
for job in self.jobs:
if not job.complete():
return False
return True

def succeeded(self) -> bool:
"""Returns: True if all jobs have succeeded, otherwise returns False
"""
"""Returns: True if all jobs have succeeded, otherwise returns False"""
for job in self.jobs:
if not job.succeeded():
return False
Expand Down

0 comments on commit 2b5f28e

Please sign in to comment.