Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Henrique Silvério <29920212+HGSilveri@users.noreply.github.com>
  • Loading branch information
MatthieuMoreau0 and HGSilveri authored Sep 18, 2024
1 parent 9cd48cb commit c9552a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pulser-core/pulser/backend/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ def get_available_results(self, submission_id: str) -> dict[str, Result]:
Unlike the `results` property, this method does not raise an error if
some jobs associated to the submission do not have results.
It returns a dictionnary mapping the job ID to their results. Jobs with
no result are omitted.
Returns:
dict[str, Result]: A dictionary mapping the job ID to their results.
Jobs with no result are omitted.
"""

results = {
Expand Down Expand Up @@ -176,7 +177,7 @@ def _fetch_result(
def _query_job_progress(
self, submission_id: str
) -> Mapping[str, tuple[JobStatus, Result | None]]:
"""Fetches the status and results of a submission.
"""Fetches the status and results of all the jobs in a submission.
Unlike `_fetch_result`, this method does not raise an error if some
jobs associated to the submission do not have results.
Expand Down
2 changes: 1 addition & 1 deletion pulser-pasqal/pulser_pasqal/pasqal_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def _fetch_result(
results: list[Result] = []
for id in job_ids:
status, result = jobs[id]
if status != {JobStatus.PENDING, JobStatus.RUNNING}:
if status in {JobStatus.PENDING, JobStatus.RUNNING}:
raise RemoteResultsError(
f"The results are not yet available, job {id} status is {status}."
)
Expand Down

0 comments on commit c9552a3

Please sign in to comment.