Skip to content

Commit

Permalink
fix: Correct serialization of status enum (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnchildren authored Aug 9, 2024
1 parent bcd8949 commit 768704f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .cz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cz_customize"
tag_format = "v$version"
version_scheme = "semver"
version = "0.4.0"
version = "0.4.1"
version_files = ["pyproject.toml"]
update_changelog_on_bump = true
major_version_zero = true
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<!-- This CHANGELOG is populated automatically by commitizen, but can be manually edited if needed. -->

## 0.4.1 (2024-08-09)


### Fixed

- Fix retry_status argument in client.

## 0.4.0 (2024-08-09)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "qnexus"
version = "0.4.0"
version = "0.4.1"
description = "Quantinuum Nexus python client."
authors = ["Vanya Eccles <vanya.eccles@quantinuum.com>", "Aidan Keay <aidan.keay@quantinuum.com>", "John Children <john.children@quantinuum.com>"]
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions qnexus/client/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ def retry_submission(
By default, jobs with the ERROR status will be retried.
"""
body = {"remote_retry_strategy": remote_retry_strategy}
body: dict[str, str | list[str]] = {"remote_retry_strategy": remote_retry_strategy}

if retry_status is not None:
body["retry_status"] = remote_retry_strategy
body["retry_status"] = [status.name for status in retry_status]

res = nexus_client.post(
f"/api/jobs/v1beta/{job.id}/rpc/retry",
Expand Down

0 comments on commit 768704f

Please sign in to comment.