Skip to content

Commit

Permalink
Black it
Browse files Browse the repository at this point in the history
  • Loading branch information
fretchen committed Feb 10, 2024
1 parent eb1941f commit f92a345
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/qlued/api_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ def post_job(request, data: JobSchemaWithTokenIn, backend_name: str):
except json.decoder.JSONDecodeError:
job_response_dict["status"] = "ERROR"
job_response_dict["detail"] = "The encoding of your json seems not work out!"
job_response_dict[
"error_message"
] = "The encoding of your json seems not work out!"
job_response_dict["error_message"] = (
"The encoding of your json seems not work out!"
)
return 406, job_response_dict
try:
storage_provider = get_storage_provider(backend_name)
Expand Down Expand Up @@ -247,9 +247,9 @@ def get_job_status(request, backend_name: str, job_id: str, token: str):
except:
job_response_dict["status"] = "ERROR"
job_response_dict["detail"] = "Error loading json data from input request!"
job_response_dict[
"error_message"
] = "Error loading json data from input request!"
job_response_dict["error_message"] = (
"Error loading json data from input request!"
)
return 406, job_response_dict
try:
# now we download the status json from the backend
Expand All @@ -263,12 +263,12 @@ def get_job_status(request, backend_name: str, job_id: str, token: str):
return 200, job_response_dict
except:
job_response_dict["status"] = "ERROR"
job_response_dict[
"detail"
] = "Error getting status from database. Maybe invalid JOB ID!"
job_response_dict[
"error_message"
] = "Error getting status from database. Maybe invalid JOB ID!"
job_response_dict["detail"] = (
"Error getting status from database. Maybe invalid JOB ID!"
)
job_response_dict["error_message"] = (
"Error getting status from database. Maybe invalid JOB ID!"
)
return 406, job_response_dict


Expand Down Expand Up @@ -319,12 +319,12 @@ def get_job_result(request, backend_name: str, job_id: str, token: str):
if status_msg_draft["status"] != "DONE":
return 200, status_msg_draft
except:
status_msg_draft[
"detail"
] = "Error getting status from database. Maybe invalid JOB ID!"
status_msg_draft[
"error_message"
] = "Error getting status from database. Maybe invalid JOB ID!"
status_msg_draft["detail"] = (
"Error getting status from database. Maybe invalid JOB ID!"
)
status_msg_draft["error_message"] = (
"Error getting status from database. Maybe invalid JOB ID!"
)
return 406, status_msg_draft
# and if the status is switched to done, we can also obtain the result
try:
Expand Down
1 change: 1 addition & 0 deletions src/qlued/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module that configures the app.
"""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test the models of this app.
"""

from datetime import datetime
import uuid

Expand Down
1 change: 1 addition & 0 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
to be used only in the test environment. They are not meant to be used in production. We will
always attempt to make them as minimal as possible.
"""

import os
from pathlib import (
Path,
Expand Down

0 comments on commit f92a345

Please sign in to comment.