Skip to content

Commit 0193f21

Browse files
committed
formatted code with black formatter
1 parent ebf2838 commit 0193f21

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/oqd_cloud/client.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Job(BaseModel):
2828
"""
2929
Job model which is stored in the SQL database
3030
"""
31+
3132
model_config = ConfigDict(from_attributes=True)
3233

3334
job_id: str
@@ -105,7 +106,7 @@ def authorization_header(self):
105106
)
106107

107108
def connect(self, provider: Provider, username: str, password: str):
108-
""" Connect to a provider URL with `username` and `password` """
109+
"""Connect to a provider URL with `username` and `password`"""
109110
self._provider = provider
110111

111112
# username = input("Enter username: ")
@@ -129,7 +130,7 @@ def connect(self, provider: Provider, username: str, password: str):
129130
# pass
130131

131132
def submit_job(self, task: Task, backend: Literal["analog-qutip",]):
132-
""" Submit a Task as an AnalogCircuit, DigitalCircuit, or AtomicCircuit to a backend. """
133+
"""Submit a Task as an AnalogCircuit, DigitalCircuit, or AtomicCircuit to a backend."""
133134
response = requests.post(
134135
self.provider.job_submission_url(backend=backend),
135136
json=task.model_dump(),
@@ -144,7 +145,7 @@ def submit_job(self, task: Task, backend: Literal["analog-qutip",]):
144145
raise response.raise_for_status()
145146

146147
def retrieve_job(self, job_id):
147-
""" Retrieve the results object of a finished job. """
148+
"""Retrieve the results object of a finished job."""
148149

149150
response = requests.get(
150151
self.provider.job_retrieval_url(job_id=job_id),
@@ -159,22 +160,22 @@ def retrieve_job(self, job_id):
159160
raise response.raise_for_status()
160161

161162
def status_update(self):
162-
""" Request status update for all jobs. """
163+
"""Request status update for all jobs."""
163164

164165
for job_id in self.jobs.keys():
165166
self.retrieve_job(job_id)
166167
pass
167168

168169
def resubmit_job(self, job_id):
169-
""" Resubmit failed job. """
170+
"""Resubmit failed job."""
170171

171172
return self.submit_job(
172173
task=Task.model_validate_json(self.jobs[job_id].task),
173174
backend=self.jobs[job_id].backend,
174175
)
175176

176177
def cancel_job(self, job_id):
177-
""" Cancel a job. """
178+
"""Cancel a job."""
178179

179180
response = requests.delete(
180181
self.provider.job_cancellation_url(job_id=job_id),

0 commit comments

Comments
 (0)